How garbage collection works in Java

How garbage collection works in Java