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
Can we make main() thread as daemon?
What restrictions are placed on method overloading?
What are exceptions
Explain how hashmap works?
What is field name?
Explain the difference between protected and default access.
What is finally and finalize in java?
What is bigger kb or mb?
What is java ceil?
How objects of a class are created if no constructor is defined in the class?
What is a boolean flag in java?
How do you achieve singleton?
What is protected access modifier?
Do you need to import math in java?
Does java vector allow null?