Cognizant interview question

What's difference between new and old Java memory management