what is the purpose of garbage collection in java


What is the purpose of garbage collection in Java, and when is it used?

The purpose of garbage collection is to identify and discard objects that are no longer required by a program so that their resources can be reclaimed and reused.

A Java object is subject to garbage collection when it becomes unreachable to the program in which it is used.

 

 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: what is the purpose of garbage collection in java
Reference No:- TGS0310960

Expected delivery within 24 Hours