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

Difference between operator overloading and function overloading

607


Can an interface implement another interface?

570


Which package has light weight components in java programming?

673


What is core java called?

522


If an object is garbage collected, can it become reachable again?

540






What are java packages? What is the significance of packages?

569


Can we convert integer to string in java?

595


How many inner classes can a class have?

572


How many types of the indexof method are there for strings?

487


How we can skip finally block of exception even if some exception occurs in the exception block in java?

518


What is r in java?

591


Explain the difference between static and dynamic binding in java?

540


Why do we use threads in java?

561


Why destructor is not used in java?

518


What is private protected in java?

546