When classes are loaded?
问题 Well, I've got such a code: public class Main { public static void main(String[] args) { Test t; //1 Integer i = new Integer(1); //2 t = new Test(); //3 System.out.println(Test4.a); //4 } } class Test { private int a = 10; private Test2 t2; //5 List<Test2> list = new ArrayList<Test2>() { { for (int i = 0; i < a; i++) { add(new Test2()); //6 } } }; } class Test2 extends Test3{ } class Test3 { } class Test4 { public static final int a = 4; } I don't know how (fully or partially) and when