This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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 Head First Android 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: 446


SCJP 6 [86%], OCPWCD [84%], OCEJPAD [83%]
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
Consider Paul's rocket mass heater.
subject: Exam lab question on Garbage Collection
It's not a secret anymore!