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

Can we make a constructor final?

530


what is meant wrapper classes?

594


What is ternary operator?

557


What is the meaning of flag day?

527


What is the exact difference in between Unicast and Multicast object?

1500






Give the hierarchy of inputstream and outputstream classes.

604


Can I learn java without any programming experience?

542


How big is a boolean?

564


What is a class variable?

556


What is synchronization and why is it important in java programming?

463


Can we declare a class as static?

583


How to display all the prime numbers between 1 and 100

493


What is java util function?

505


What are the advantages of user defined functions?

545


Does java initialize arrays to zero?

495