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
Can singleton class be cloned?
what are the high-level thread states? : Java thread
Is string is a data type in java?
Difference between static synchronization vs. Instance synchronization?
Give any two differences between C++ and java.
Difference between nested and inner classes ?
Can an interface extend a class?
What is multithreading and its advantages?
What is the public field modifier?
How do you sort a set in java?
Write a program to calculate factorial in java?
Why we go for collections in java?
What is :: operator in java?
Can you sort a list in java?
Write a factorial program using recursion in java?