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 the benefit of abstract class?
What is an exception? difference between Checked and Unchecked exception in Java
Define Multiprogramming and Multiprocessing in java.
Is arraylist zero based?
Is void a data type?
Which method cannot be overridden in java?
Explain the importance of finalize() method.
What is tostring () method?
how to write a server program and sending the mails to the server using smtp protocol please help me
What do you mean by JVM?
Can each java object keep track of all the threads that want to exclusively access it?
What is the relationship difference the canvas class and the graphics class?
If an object is garbage collected, can it become reachable again?
What are the advantages of defining packages in java?
What is the difference between heap memory and stack memory?