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

Answer Posted / devarathnam c,kotagudibanda(po

Hi...
GarbageCollector: Whenever an object is no longer used in
the program at that time the garbage collector reclaims the
memory of an object.It is controlled by the JVM ,The JVM
runs periadically by using "mark" and "sweep"algorithms.
Instead of "destructor" in c++ , java supports garbage
collector.

Is This Answer Correct ?    84 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why method overriding is used?

635


How does arraylist size increase in java?

620


How define set in java?

622


what is meant wrapper classes?

709


What is the use of string and stringbuffer?

662






Which container method is used to cause a container to be laid out and redisplayed in java programming?

712


Can you add null to a list java?

679


What does the “final” keyword mean in front of a variable? A method? A class?

639


What is the diffrence between inner class and nested class?

675


Can we make a constructor final?

649


What are java methods?

669


Explain about static imports in java?

685


Can we extend singleton class?

607


How do you achieve singleton?

614


How to perform binary search in java?

671