Pregunta de entrevista de Google

The key thing was understanding how the java garbage collector worked.

Respuestas de entrevistas

Anónimo

31 ago 2010

It scans the stack, looking for pointers into the heap. Any object in the heap with no pointer is unused.

Anónimo

4 jun 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.