• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
https://coderanch.com/t/423110/Programmer-Certification-SCJP/certification/Garbage-collection


 
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
your answer is corrected
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic