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

What is tcp ip in java?

591


What does replaceall do in java?

489


what is difference between equals and ==?

591


What is Java Shutdown Hook?

611


What is an object class?

561






Differentiate between postfix and prefix operators in java.

646


When to use runnable interface vs thread class in java?

526


Can we have more than one package statement in source file ?

590


What are the differences between abstract class and interface?

514


What is the disadvantage of java?

508


What is thread life cycle in java?

586


Why char array is preferred over string for storing password?

590


Can an interface extend another interface?

601


What is the final class?

551


List some java keywords sun like c, c + + keywords?

592