Pregunta de entrevista de AMD

How does garbage collection work in Java versus Python