This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Mock Exam Errata and the fly likes Error in SJCP 5 Learnkey Bonus exam, finalize() / garbage collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "Error in SJCP 5 Learnkey Bonus exam, finalize() / garbage collection" Watch "Error in SJCP 5 Learnkey Bonus exam, finalize() / garbage collection" New topic
Author

Error in SJCP 5 Learnkey Bonus exam, finalize() / garbage collection

Wolfgang Schwendt
Greenhorn

Joined: Jan 29, 2009
Posts: 8
There is an error in question 12 of the Learnkey Bonus exam for SJCP 5.



While the code represented by "// do time consuming and memory intensive stuff " is executing, which are true regarding the three Phoenix objects we know have been created? (Choose all that apply).

A .No Phonix object are eligible for GC.
B. Atleast one Phoenix object is eligible for GC
C. Atleast two Phoenix object are eligible for GC
D .The JVM could have invoked the finalize() method at least once.
E .The JVM could have invoked the finalize() method more than once total for these three objects
F. The JVM could have invoked the finalize() method more than twice total for these three objects
G. this code will not compile



Solution according to Learnkey Exam: B and D are correct.

However, the real solution is: B, D, and E is correct.

See the following thread for a more detailed discussion and an example program which verifies the described error:
http://www.coderanch.com/t/423110/Programmer-Certification-SCJP/certification/Garbage-collection


Juee Doo
Ranch Hand

Joined: Sep 26, 2008
Posts: 232
your answer is corrected
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Error in SJCP 5 Learnkey Bonus exam, finalize() / garbage collection
 
Similar Threads
que on GC
Master exam doubt
GC question 2
JVM
Garbage collection..