Hi,
I thik i will again advocate use of diagrams whenever having confusion over GC question.
https://coderanch.com/t/259787/java-programmer-SCJP/certification/Garbage-Collection-think-answer-provided Now for island of isolation i came up with diagram given below
This is the state of object memory pool up to line 7
Now, two objects allocated in memory pool cannot be reached, as there is no way to reach reference varaible "x", this is like island of isolation
for two objects shown above, although each object having reference but it cannot be refer by program. Hence Garbage collector is smart enough to identify such scenario and claim memory allocated to both objects shown above.
Hope it helps !!