Pregunta de entrevista de Ford Motor Company

How does garbage collection differ in Java and C++?