SCJP 5.0, SCWCD in progress
SCJP 5.0, SCWCD in progress
Originally posted by Robert Elbourn:
so why isn't c3 elligable for garbage collection ?
SCJP 5.0
Originally posted by Robert Elbourn:
so why isn't c3 elligable for garbage collection ?
c3= c1.go(c2);
c1.go(c2) returns null
so isn't that the same as
c3 = null ?
Objective: SCJP 1.5<br /><a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html" target="_blank" rel="nofollow">API</a><br /> <blockquote><font size="1" face="Verdana, Arial">code:</font><hr><pre><font size="2"><br />Double n1 = Double.NaN; Double n2 = Double.NaN;<br /> n1.equals(n2) // true even though Double.NaN != Double.NaN<br />-0.0 == +0.0; // true<br />Double n1 = -0.0;Double n2 = +0.0;<br />n1.equals(n2) // false even though -0.0 == +0.0<br /></font></pre><hr></blockquote>
SCJP, SCWCD, SCBCD
Originally posted by Jan Nowak:
I think the answer should be: there is 1 object eligible for garbage collection.
SCJP 5.0
SCJP, SCWCD, SCBCD
Originally posted by Deepak Jain:
I have seen this question in Bert Bates book. I feel the answer should be 1 and not 2 objects.
SCJP 5.0
Originally posted by Kelvin Lim:
Because c3 was never assigned an object in the first place.![]()
There is no greater crime than stealing somebody's best friend. I miss you tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|