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 is garbage collection controlled?
What is a default constructor and also define copy contrucyor?
What is a linkedhashmap java?
Write a program based on Java script program.
What is square root in java?
What is a null point?
Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)
How to perform merge sort in java?
What is the main advantage of passing argument by reference?
What is the purpose of an interface?
Why are functions called methods in java?
Is an object null?
Can constructor be synchronized?
Is it possible to use string in the switch case?
What are the two environment variables that must be set in order to run any java programs?