Page 1 of 1

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

Posted: Tue Jun 30, 2020 7:48 am
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 10909 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

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

Posted: Tue Jun 30, 2020 8:11 am
by admin
Yes, you are right. It should be baz. Added to errata.
thank you for your feedback!