| Author |
Questions on Garbage Collections
|
Nikhil Jain
Ranch Hand
Joined: May 15, 2005
Posts: 383
|
|
Hello Friends, I find really confusing when I tried to solve questions like "How many objects are eligible at garbage collection". Can you please suggest me some trick Secondly in question like obj a=new Integer(); boj b=new Long(); a=null; ....1 a=b; ....2 Will the object a be eligible for gc at line 1? thanks shashank
|
SCJP 1.4, SCWCD 1.4, SCBCD 1.5
|
 |
vidya sagar
Ranch Hand
Joined: Mar 02, 2005
Posts: 580
|
|
"How many objects are eligible at garbage collection". Can you please suggest me some trick
Use picture representation
Will the object a be eligible for gc at line 1?
After line 1 Object is eligible for GC
|
 |
 |
|
|
subject: Questions on Garbage Collections
|
|
|