posted 16 years ago
4 is definitely not as the object might be referenced by other reference variable, so its not guaranteed. Also nothing is guaranteed for GC, only something might be eligible for GC.
I am not sure about # 2, but I think primitive stays in stack not heap, so its not eligible for GC. If, I am wrong, please someone correct.
Thanks,
Mohammad
[ October 17, 2008: Message edited by: Mohammad Khan ]
[ October 17, 2008: Message edited by: Mohammad Khan ]
[ October 17, 2008: Message edited by: Mohammad Khan ]