What is garbage collection in Java, and how can it be used ?

Answer Posted / nitin kumar

Garbage collection is a system level thread that tracks each
memory allocation. During the idle cycles in the JVM, the
garbage collection thread check for and frees memory that
can be freed. It happen automatically during the lifetime of
a Java Technology program.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we make sure main() is the last thread to finish in java program?

779


What is the purpose of return statement?

712


What are pass by reference and pass by value?

609


Why is logger singleton?

650


what is meant by Garbage collection?

716






What is linked hashset and its features?

624


What does bitwise or mean?

673


Which package is used for pattern matching with regular expressions?

731


How to find the index of the largest number in an arraylist java?

616


What is the difference between state-based unit testing and interaction-based unit testing?

593


Why are there no global variables in java?

674


Can we override protected method in java?

690


What is number data type?

626


how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)

1992


Explain the usage of this with constructors?

638