Java Programming language

Performing Garbage Collection in Java

Table of Contents
    Add a header to begin generating the table of contents

    Introduction

    In object-oriented programming languages (like C++ and Java), there could be unused objects that are still a part of the program. These will create undesirable results like an out of memory error, for instance, during run-time, if left unattended. The memory occupied by such objects is known as ‘garbage’ and the mechanism to eliminate this from the program is called ‘garbage collection’.

     

    Unlike C++, Java provides the programmer with an assistant to delete useless objects, which is called the garbage collector. In Java, there is no Out Of Memory Error thanks to the garbage collector, which destroys unused objects. Java is also called a robust programming language because of such mechanisms. Because of this background mechanism, the stress on the programmer is significantly less.

     

    Written by one of our mentors, January 2015 edition of Open Source For You (OSFY) is having an article titled ‘Performing Garbage Collection in Java’ got published. Here is the URL to download the complete PDF version of the article:

     

    https://www.emertxe.com/content/osfy_jan_2015_vikash_garbage_collection.pdf

    Share this material with your friend:

    Leave a Comment