Bank of America interview question

Memory management in Java .