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
How can we find the sum of two linked lists using stack in java?
Write code of any action class?
why doesn't java run on all platforms?
What are different types of encoding?
How to sort an array in java without using sort method?
Why string is immutable or final in java
What is linkedlist in java?
Difference between final and effectively final ? Why is effectively final even required ?
What is temp in java?
Difference between Linked list and Queue?
If an object reference is set to null, will the garbage collector immediately free the memory held by that object?
What are the different types of collections in java?
Explain the difference between an Interface and an Abstract class?
What do you mean Abstraction in java?
Explain throw keyword in java?