doubt on garbage collection
How the garbage collection thread is called.
Who calls the garbage collection thread. Is it jvm itself.
Is it called by jvm when ever we start running a program.
And when we say that garbage collection is an automatic process then why do we implement
System.gc()
in our code time to time.It should not make any sense if garbage collection runs on its own and if the garbage collection can not be forced.
Kindly explain.