For the others: some notes about garbage collection:
First, regard that only objects are garbage collected. Sometimes beginners tend to try to garbage collect variables.
Second main thing: an object is eligible for garbage collection when no live thread can access it.
As in Arif's example: no other variable refers the first object, so it is useless. The object is still in memory, but nobody can use it. It can be GCd.
Citing myself: is eligible for garbage collection
Means, that the garbage collector may dump the object. You cannot do it by hand, as garbage collection works automatically in background in a daemon thread. You cannot force it, but you can kind of persuade it to do it's job.
Therefore in all this questions, it says "is eligible for gc". When an answer to a question is "is garbage collected" then it the answer is possibly false, as you cannot tell, when the thing is dumped actually.
For "island of isolation" follow the hint from Arif and search for it.
If the town dog catcher drives the streets of town all day and sees people walking dogs on a leash (meaning referenced dogs, a dog object held referenced to a person by a leash) he/she will simply ignore them and keep driving.
As soon as a dog becomes "unreferenced" (person let go of that leash, or let go to grab another leash) then the dog is just hanging around unreferenced. The next time the dog catcher happens by, THAT dog is elligible to be picked up and taken back to the pound.
This is a pretty wide stretch I know.... but it gives an idea. The garbage collector keeps track of objects and references. When all references to an object go away (either nulled, or replaced by another object reference, or the reference variable dies) then the object is elligible for garbage collection.
SCJP - 86% - June 11, 2009
Whose rules are you playing by? This tiny ad doesn't respect those rules: