OCP Java SE11.1 Study Guide: typo in 4.6.3 Garbage collection for the exam

Post Reply
kowenli
Posts: 1
Joined: Tue Jun 30, 2020 7:29 am
Contact:

OCP Java SE11.1 Study Guide: typo in 4.6.3 Garbage collection for the exam

Post by kowenli »

In section 4.6.3 an example is given about garbage collection and objects' eligibility for garbage collection.

At step 7 of the example is written:
bar vs baz GC 2020-06-30 140905.png
bar vs baz GC 2020-06-30 140905.png (108.61 KiB) Viewed 30688 times
At line 9, a new object is created and assigned to baz. Thus, bar stops pointing to obj 1 and starts pointing to obj 3 after the execution of this line.
In my opinion this is a typo and should be:
At line 9, a new object is created and assigned to baz. Thus, baz stops pointing to obj 1 and starts pointing to obj 3 after the execution of this line.
Deshmukh, Hanumant. OCP Oracle Certified Professional Java SE 11 Programmer I Exam Fundamentals 1Z0-815: Study guide for passing the OCP Java 11 Developer Certification Part 1 Exam 1Z0-815 (pp. 97-98). Enthuware.
Hardcopy Edition: build 1.13
Kindle Edition: build 1.20

I could not find this in the errata[1] under location "4.6.3", nor with search for "bar", "baz" and "garbage collection".
[1] https://enthuware.com/resources/ocp-jav ... ook-errata

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

Re: OCP Java SE11.1 Study Guide: typo in 4.6.3 Garbage collection for the exam

Post by admin »

Yes, you are right. It should be baz. Added to errata.
thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 42 guests