How Does Garbage Collection Work in Java ?

Java has an automated process called Garbage Collector for Memory Management. It is a daemon in JVM that monitors the memory usage and performs memory cleanup. Once JVM is low on memory, GC process finds the unused objects that are not referenced by other objects. These unused objects are cleaned up by Garbage Collector daemon in JVM.



You May Interest

What is the Difference Between pass by reference and pass by valu ...

How Can You Make an Object Eligible for Garbage Collection in Jav ...

What is the Difference Between Throw and Throws in Java ?

What is the Difference Between an Iterator and ListIterator in Ja ...

What are the Different Types of Classloaders in Java ?