aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Finalize Drag and Drop - thoughts? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Finalize Drag and Drop - thoughts?" Watch "Finalize Drag and Drop - thoughts?" New topic
Author

Finalize Drag and Drop - thoughts?

Jeff Levine
Greenhorn

Joined: Jun 03, 2013
Posts: 8
Hi Everyone,

Thoughts on the following OCPJP 5 mock exam question (Whizlabs practice test)?

The finalize method...
a) May or may not be called just before garbage collection happens.
b) Can be used to resurrect an object.

The correct answer is B, which I understand.
I chose option A, because the finalize method is only called once - if the object is resurrected, it will not be called before GC is called a second time.

Do both answers seem correct? If not, why isn't A correct?

Thanks,
Jeff
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31105
    
165

I agree with you.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
Consider Paul's rocket mass heater.
 
subject: Finalize Drag and Drop - thoughts?