nss
...there are 2 objects pointing f and o to the float object.
Ashik Uzzaman
Director of Engineering, Twin Health, Mountain View, CA, USA
nss
Originally posted by Bala Rajamani:
When is float object is eligible for GC??
1. public Object method(){
2.Float f = new Float("3.7f")
3.Object 0 = f;
4.f = null;
5. o = null;
6. return 0;
7. }
1.After line 3
2.After line 4
3.After line 5
4.After line 6
5.After line 7
I thought "After Line 4"(option 2)? But the given ans is "After line 5"?
Can some one explain me how???
Thanks,
Bala.
[This message has been edited by Bala Rajamani (edited October 12, 2001).]
Radu Zaharia
SCJP 1.4, SCBCD 1.3
SCJP2. Please Indent your code using UBB Code
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Originally posted by Harsha Jayan:
1. public Object method(){
2. float f = 1.23f;
3. float o = f;
4. f = null;
5. o = null;
6. return 0;
7. }
So in that case ,if i modify the code as shown above will it still be after line 5 or line 4.
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt