we can't predict the finalize() calling sequence.
Am i right?
Tony Morris
Java Q&A (FAQ, Trivia)
Tony Morris
Java Q&A (FAQ, Trivia)
SCJA 1.0 (98%), SCJP 1.4 (98%)
Originally posted by Lavanya Pinnamareddy:
I'm not getting one point.
If we r not able to determine when will the object becomes eligible for garbage collection... how can we determine the finlize() method call?
if we can't determine that... how come Ba coming into picture?
Originally posted by Joyce Lee:
It could be called right after the B object "Ba" is not longer referenced by bc variable. In that case, the output will be "Ba, B1, B2, Bb". Or it could never be called and the output will be ", B1, B2 , Bb".
SCJA 1.0 (98%), SCJP 1.4 (98%)
Slime does not pay. Always keep your tiny ad dry.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|