While I wouldn't really qualify myself as a java expert,
anyways coming to the qstn here I go...
I have seen in the previous post (abt 4 mths back) it was
advised on the ranch that for the purpose of
SCJP exam,
we should forget abt the concept of String pools.
Once we forget that, the other concept is (my first lesson
from Maha) "anObj" is a reference to an object and the
object is what gets GC'd.
Thought the qstn is ambiguous (which obj is to be GC'd?
the obj
sample or the uppercase obj
SAMPLE)
in such cases, assuming the author refers to the obj
sample the answer would be
d.
Why the assumption, i have no idea...I told you my ambiguity
abt the qstn before....
Hopefully we agree.....
Regds.
- satya