Line 4
代入ステートメントが で実行されたときにnew operator
何foo
が起こっているのですか?
public class Foo {
// creating an instance before its constructor has been invoked, suppose the "initializing"
// gets printed in constructor as a result of the next line, of course it will not print it
private Foo foo = new Foo();//Line 4
public Foo() {
System.out.println("initializing");
}
}