-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJavaMemoryMain2.java
More file actions
23 lines (19 loc) · 578 Bytes
/
JavaMemoryMain2.java
File metadata and controls
23 lines (19 loc) · 578 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package memory;
public class JavaMemoryMain2 {
public static void main(String[] args) {
System.out.println("main start");
method1();
System.out.println("main end");;
}
static void method1() {
System.out.println("method1 start");
Data data1 = new Data(10);
method2(data1);
System.out.println("method1 end");
}
static void method2(Data data2){
System.out.println("method2 start");
System.out.println("data.value="+data2.getValue());
System.out.println("method2 end");
}
}