File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Programmer Certification (SCJP/OCPJP)
Finalize Drag and Drop - thoughts?
Joined: Jun 03, 2013
Jun 08, 2013 07:59:47
Thoughts on the following OCPJP 5 mock exam question (Whizlabs practice
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?
author & internet detective
Joined: May 26, 2003
Jun 08, 2013 08:11:49
I agree with you.
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
subject: Finalize Drag and Drop - thoughts?
Calling Bert Bates
MindQ (Q.37) GC
GC question on MindQ no. 37
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014