Pregunta de entrevista de Infosys

what is a garbage collector in Java