Suppose JVM has loaded the following Foo class for the first time and it's just passed to Linking step ( during resolution ).
public static void main(...) {
new Foo();
}
public class Foo {
private static int a = 4;
private static Hoo hoo = new Hoo();
Foo (){
Log.i("Test", ">> Test foo's created!");
}
}
public class Hoo {
private static int b = 4;
private static Soo soo = new Soo();
Hoo (){
Log.i("Test", ">> Test hoo's created!");
}
}
public class Soo {
private static int b = 4;
private static Koo soo = new Koo();
Soo (){
Log.i("Test", ">> Test soo's created!");
}
}
...
Now my question is this. We know that prior to completing child class construction, system calls recursively base/super class constructor(s). Does there exist some similar logic lies in the above code? I mean does JVM will complete the construction of Foo right after completing the Hoo() and Soo() construction ?
Thx.