we can't predict the finalize() calling sequence.
Am i right?
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".