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
Where is jre installed?
How does the java compiler work?
What is string args [] in java?
What is the maximum size of array in java?
Define immutable object?
Can we sort list in java?
Is a boolean variable?
Why java is call by value?
Can substring create new object?
What is the multi-catch block in java?
What are the methods available in a class?
What is widening and narrowing in java? Discuss with an example.
Which of the following is not an isolation level in the JDBC
Explain the features of java?
What is difference between iterator and enumeration in java?