wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Exam lab question on 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 » Programmer Certification (SCJP/OCPJP)
Bookmark "Exam lab question on Garbage Collection" Watch "Exam lab question on Garbage Collection" New topic

Exam lab question on Garbage Collection

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

How many objects are eligible for garbage collection after c.aob=null;?


i think answer should be 1
i have attached the image file showing the objects

[Thumbnail for s.png]

OCPJP 6.0 93%
OCPJWCD 5.0 98%
Prasad Kharkar
Ranch Hand

Joined: Mar 07, 2010
Posts: 438


SCJP 6 [86%] June 30th, 2010
OCPWCD [84%] March 26th, 2013
If you find any post useful, click the "plus one" sign on the right
Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051

Discussed many times..
Remember only objects are eligible for Garbage collection not refernce type

SCJP6.0,My blog Ranchers from Delhi
I agree. Here's the link: http://aspose.com/file-tools
subject: Exam lab question on Garbage Collection
Similar Threads
Problem in Garbage collector
Garbage Collection Question from Devaka's Exam Labs for SCJP6 - diagnostic exam question number 70.
Garbage collect question
Garbage collection problem...(question from ExamLab)
How many object is eligible for garbage collection?