Pergunta de entrevista da empresa AMD

How does garbage collection work in Java versus Python