What is garbage collection in Java, and how can it be used ?
Answer Posted / pranab dutta
When a Java object becomes unreachable to the program, then
it is subjected to garbage collection. The main use of
garbage collection is to identify and discard objects that
are no longer needed by a program so that their resources
can be reclaimed and reused.
| Is This Answer Correct ? | 324 Yes | 35 No |
Post New Answer View All Answers
Are primitives objects?
Explain restrictions for using anonymous inner classes?
What is factor r?
How do you remove an object from an arraylist in java?
How many types of memory areas are allocated by JVM in java?
How would you dynamically allocate memory to an array?
What is difference between == and === in js?
What sorting algorithm does javascript use?
What is string data type?
How do you implement polymorphism in our day to day life?
What is the size of arraylist in java?
Explain the term virtual machine?
Does hashset allow duplicates in java?
What does a method signature consist of?
State the significance of public, private, protected class?