Originally posted by Fred Roger:
Question is: What will happen to the refernce named i1.other, i2 other.
Will they also refered to 3 now ?? Or they will continue to refering to theie old objects ??
According to second scenerio there will be no objects GC at // here.
Matt
Inquisition: open-source mock exam simulator for SCJP and SCWCD
Originally posted by Fred Roger:
Hi guys,
<snip>
According to my understanding:
We have three objects say 1, 2, 3
before line 1:
1 ----> referred by i1 and i2.other
2 ----> referred by i2 and i1.other
3 ----> referred by i3 and i3.other
After line 1:
As i1 and i2 will be refering to 3(3rd object)
3-----> i1, i2, i3, i3.other
Question is: What will happen to the refernce named i1.other, i2 other.
Will they also refered to 3 now ??
all events occur in real time
~Sanjeev Singh<br />SCJP 1.5
Originally posted by Sanjeev Kumar Singh:
Nice explanation Bu.
One more question?
When // doStuff is reached, how many objects are eligible for GC?
all events occur in real time
Question:
Short x = 5; is created on heap?
all events occur in real time
all events occur in real time
Consider Paul's rocket mass heater. |