Well the question is valid, you can always be asked to tell how many objects are eligible for GC. There won't be any questions which rely on the behavior of System.gc() so in the question you can ignore that line. Moguluri's diagram should clear your problem...