[HD Pg 263, Sec. 9.3.4 - order-of-initialization-summarized]

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
OCAJO1
Posts: 221
Joined: Mon Nov 26, 2018 2:43 pm
Contact:

[HD Pg 263, Sec. 9.3.4 - order-of-initialization-summarized]

Post by OCAJO1 »

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
}

admin
Site Admin
Posts: 10403
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: [HD Pg 263, Sec. 9.3.4 - order-of-initialization-summarized]

Post by admin »

Right. Added to errata.
thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 8 guests