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

Answer Posted / samji

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 ?    4 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is static keyword in java?

554


Why do we override tostring method in java?

513


How can we make a class singleton?

578


Give an example of call be reference significance.

611


Where and how can you use a private constructor?

537






What is difference between string and new string?

542


What do you understand by synchronization?

596


How to sort an array from smallest to largest java?

548


What is difference between word and integer?

598


How to change value in arraylist java?

506


What is polymorphism and what are the types of it?

509


What is the difference between I ++ and ++ I in java?

507


Is null keyword in java?

528


How are this() and super() used with constructors in java programming?

573


what is a working thread? : Java thread

556