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 is the difference between quicksort & mergesort? When should they be used? What is their running time?
What is an infinite loop in java? Explain with an example.
Can we extend private class in java?
How is a structure different from array ?
What is the format specifier?
what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread
Define packages in java?
What is broken and continue statement?
Which is faster string or stringbuilder?
What is a wrapper method?
What do you mean by jjs in java8?
What is nested loop? What is dangling else condition in it?
What is meant by class?
Is null or empty java?
If a class is declared without any access modifiers, where may the class be accessed in java programming?