1.

What Is The Purpose Of Garbage Collection In Java, And When Is It Used?

Answer»

Garbage collection is a special FEATURE in java LANGUAGE. It helps DEVELOPER to save TIME and extra mental tension for handling object allocation in memory. It automatically clean the unused object from memory which helps to allocate space at runtime. When there is no reference to an object FOUND, it will clean that object from memory . You can run the garbage collection explicitly by using System.gc().

Garbage collection is a special feature in java language. It helps developer to save time and extra mental tension for handling object allocation in memory. It automatically clean the unused object from memory which helps to allocate space at runtime. When there is no reference to an object found, it will clean that object from memory . You can run the garbage collection explicitly by using System.gc().



Discussion

No Comment Found