标签:
//测试代码:
1 public class Test02 2 { 3 public Test02() 4 { 5 System.out.println("Test02"); 6 } 7 public static void main(String[] args) 8 { 9 Test03 test03= new Test03(); //1 10 //Test03.f(); //2 11 // System.out.println(Test03.i); //3 12 } 13 } 14 15 class Test03 16 { 17 static int i = 3; 18 static Test02 test02 = new Test02(); 19 Test01 test01 = new Test01(); 20 21 static 22 { 23 System.out.println("static"); 24 } 25 { 26 System.out.println("nostatic"); 27 } 28 static void f() 29 { 30 System.out.println("f()"); 31 } 32 33 public Test03() 34 { 35 System.out.println("Test03"); 36 } 37 }
标签:
原文地址:http://www.cnblogs.com/itpipi/p/4743253.html