Goldman Sachs interview question

How the java garbage collector works