Pregunta de entrevista de Oviva

How does the garbage collector work in Java?