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

Answer Posted / siva

Garbage collection is a thread, that runs to reclaim the
memory by destroying objects which object is cannot be
referenced anymore.
instead of calling destructor JVM do it automatically, as we
use destructor in c++ to destroy the object

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between throw and throws in java?

536


What are java packages?

564


Is a boolean variable?

505


What is the set interface in java programming?

611


What is the use of :: in java?

554






What are the restrictions that are applied to the java static methods?

513


Explain what pure virtual function is?

579


Does every java program need a main?

519


Explain about anonymous inner classes ?

561


Why does java have different data types for integers and floating-point values?

521


How is the marker interface used in Java?

595


What is the difference between post and put?

528


How do you reverse sort a list in java?

492


Explain the Propertie sof class?

573


What do you mean by append?

518