执行一段代码:
public class Father { public String str="xue"; public Father(){ System.out.println(" -------------Father构造函数"); System.out.println(str); } public static void main(String[] args) { Father f=new Father(); } }
Debug执行:
1.
2
3.
4.
5.
6
7
public class Father { public String str="xue"; public Father(){ System.out.println(" -------------Father构造函数"); System.out.println(str); } public static void main(String[] args) { Father f=new Father(); } }
1.
2
3.
4.
5.
6
7