Hi Ansar Shah,
Actually there is a post about this question already.
First object that is eligible for GC is obviously c1; when it was set to null.
The second object is c3 which is assigned to null. (c1.go(c2) return null)
Here, c2 is set to null only in the go() method scope, after the method finished, c2 is back to its previous value. Simply said, c2 is null only while c1.go(c2) is called.
Correct me if I were wrong.
You can check it with this code: (put it after //do stuff)
Check the output!!!
Cheers,
Fedry
[ August 13, 2007: Message edited by: fedry kemilau ]