Electrum Software interview question

Garbage collection in java. How does it work?