String name;
String newName = "Nick";
newName = "Jason";
name = "Frieda";
String newestName = name;
name = null;
//Line A
1.how many objects are eligible for GC? after name=null.
2.Strictly speaking string literals are not eligible for GC then
why such a question in almost all mock exams.?
3.Do we get a similar question in
SCJP also? if so then what should be our answer PLEASE clarify .
Thanks in advance,
sunil.s
------------------
"Winners don't do different things
They do things differently"