wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes kathy sierra question doubt 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 "kathy sierra question doubt" Watch "kathy sierra question doubt" New topic

kathy sierra question doubt

Jacob Sonia
Ranch Hand

Joined: Jun 28, 2009
Posts: 174

Please help me understand that how is just one object eligible for GC after //dostuff is reached
Rohan Kayan
Ranch Hand

Joined: Sep 17, 2004
Posts: 123
Only object pointed by a1 is eligible to GC.

a2.b1 -> b1
a2.b2 ->b2

SCWCD 1.4, SCJP 1.4
Ankit Garg

Joined: Aug 03, 2008
Posts: 9291

Jacob please SearchFirst. This question has been asked many times in the forum. Search for "alpha beta" in the forum, you'll get a lot of good explanations...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
It is sorta covered in the JavaRanch Style Guide.
subject: kathy sierra question doubt
Similar Threads
Objects eligible for GC
How many eligible for gc?
Garbage collection program really confusing me?
Error in the SCJP6 Study Guide Mock Exam Question?
Garbage Collection query.