Best way to see is by drawing the objects in the question with their relationships. And a simple search will give you same exact question discussed before in the forum like this Make a special note about the static reference too.
ok Vijitha thanks in advance, can you give me a diagramatic representation on how to represent a garbage collection .I saw in the book related to isolations of island i was unable to understand the diagram (i did understood the diagram a bit but not in a crystal clear manner .)