Vanguard interview question

How is garbage collection handled in Java?