The key thing was understanding how the java garbage collector worked.
Réponses aux questions d'entretien
Utilisateur anonyme
31 août 2010
It scans the stack, looking for pointers into the heap. Any object in the heap with no pointer is unused.
Utilisateur anonyme
4 juin 2012
I don't understand why allegedly brilliant programmers keep asking this question. There is no single way garbage collection works because the JVMS doesn't even require garbage collection. It's JVM dependent.