Code:
class A { static { System.out.println(\"loading A static 1\"); } static { System.out.println(\"loading A static 2 B.c= \"+B
You can check this by executing it with java -verbose Test:
java -verbose Test
... [Loaded A from file:/.../src/main/java/] [Loaded B from file:/.../src/main/java/] loading A static 1 loading A static 2 B.c= 0 loading static 3 loading B A.a= 10 ...
So no, the parent class is loaded first too.