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

When is UnsupportedOperationException Thrown in Java ?

What is Information Hiding in Java ?

Why ListIterator Has add Method But Iterator Does Not Have in Jav ...

Why Collection Interface Doesn’t Extend Cloneable and Serializabl ...

How Will You Use Other Java Files of Your Application in JSP Code ...