Pregunta de entrevista de Amadeus

General questions: differences between java and c++, Java Garbage collector, an example of memory leak