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
What is arraylist e in java?
How to use Media tracker Class.
Difference between a class and an object?
Write a program to reverse a number in java?
What is immutable data?
What is anti pattern in programming?
When should you use arraylist and when should you use linkedlist?
Difference between process and thread?
How do you execute a thread in java?
What about main thread in java?
Explain java code for recursive solution's base case?
Can a class be private?
How to retrieve data from database in java using arraylist?
Can we clone singleton object?
Which is easier netbeans or eclipse?