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

Answer Posted / pranab dutta

When a Java object becomes unreachable to the program, then
it is subjected to garbage collection. The main use of
garbage collection is to identify and discard objects that
are no longer needed by a program so that their resources
can be reclaimed and reused.

Is This Answer Correct ?    322 Yes 35 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you understand by the term singleton?

570


What is difference between stringbuffer and string?

482


Explain the usage of this with constructors?

517


What is java in detail?

549


what is collatration?

2731






Explain the difference between private, public, package and protected in java?

587


What is data type in computer?

513


What is this keyword in java?

554


what is a green thread? : Java thread

563


Is char a data type in java?

533


Is array dynamic in java?

473


How can we make a class virtual?

629


What is a method in coding?

559


How do you define a method?

504


What is the requirement of thread in java?

608