When JVM starts up,then it creates a heap area which is known as runtime data area. This is where all the objects like-instances of class are stored. Since this area is limited, it is required to manage this area efficiently by removing the objects that are no longer in use. The process of removing unused objects from heap memory is known as Garbage collection and this is a part of memory management in Java.
Languages like C/C++ don’t support automatic garbage collection, however in java, the garbage collection is automatic.
Now we know that the garbage collection in java is automatic. Lets see when does java performs garbage collection.
Myself KarthiQ, I am the author of this blog, I know ways to write a good article but some how I donot have the skills to make it to reach people, would you like help me to reach more people By sharing this Article in the social media.