This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hi, I am little bit confused about this question. Please Help me.
A. You can directly free the memory allocated by an object. B. You can directly run the garbage collector whenever you want to. C. The garbage collector informs your object when it is about to be garbage collected. D. The garbage collector reclaims your object's memory as soon as it becomes a candidate for garbage collection. E. The garbage collector runs in low-memory situations.
My choices are : A.false B.false C.false D.false E.true Correct me if I am wrong. Thanking you Rosemol.
The only correct answer is c. Before collecting object's memoty gc invokes finalize(). Low priority thread does not mean that gc will run in low memory situations. You can never predict when gc is going to run, not even System.gc() ensures that. Ashish
Joined: Aug 08, 2000
Thank you all, Now I chose only Option C. Since low priority does not means low memory and Garbage Colletion cannot be predicted Thanking you all Rosemol.