Cloudera Interview Question

What does garbage collector do in Java