[HD Pg 263, Sec. 9.3.4 - order-of-initialization-summarized]
Posted: Wed Mar 06, 2019 1:45 pm
Should change the reference in the second instantiation from b to maybe a bb or b2.
Code: Select all
public static void main(String[] args) {
System.out.println("In B.main()");
B b = new B();
B b = new B(); //creating B's object again
}