I am new to Java and confused about the garbage collector in Java. What does it actually do and when does it comes into action. Please describe some of the properties of the
Garbage collector is a component of jvm.
It is used to collect garbage when ever cpu gets free.
Here garbage means unused objects it runs in Background of main program
to monitor the status of the main program.