What is garbage collection in Java, and how can it be used ?
Answer Posted / samji
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 ? | 4 Yes | 6 No |
Post New Answer View All Answers
What is the difference between final, finally and finalize() in java?
Difference between stack and queue?
What is compareto () in java?
What is locale in java?
How do you start a new line in java?
How we can declare a static variable?
Explain public static void main(string args[]) in java.
Why can't we override private static methods?
Why java uses the concept of the string literal?
Can we create object of static class?
Explain thread in java?
Why is an interface be able to extend more than one interface but a class can’t extend more than one class?
What is the purpose of finalization in java programming?
What is the symbol for space?
What do you mean by Function Overloading in java?