How is Garbage collection done in Java?
Answer Posted / sandeep
Garbage Collection is a complex feature in Java Technology.
By Programme we cannot cause gc but we can request JVM using
gc() method but it does not gurantee. Actually when an
object in our programme become unreachable it is ready to
garbage collection..the garbage collection runs periodically
and then claim the memory it does occupy ( the unreachable
object)..and is how garbage collected is done.
| Is This Answer Correct ? | 17 Yes | 2 No |
Post New Answer View All Answers
What are the main uses of the super keyword?
What are the types of inner classes (non-static nested class) used in java?
what is singleton class in java?
why Interface used?
Can I uninstall java?
What do you mean by buffering?
What is the basic of java?
Can two objects have same hashcode?
What do you mean Abstraction in java?
What is autoboxing and unboxing?
Break statement can be used as labels in java?
Why we use protected in java?
Why can we not override static method?
What is the size of a string in java?
How to optimize the javac output?