How GC (Garbage Collector) knows the objects reference is
unused.Whether GC removes the unused object Parmanently or
it maintains something.
Answer Posted / devarathnam.c, kotagudibanda,k
Hi,
The Garbage Collector(GC)will be always under the control
of JVM, So JVM periodically runs the GC. It uses "sweep"
and "mark" algorithms to identify the unused objects in the
application. You don't bother about GC, JVM will take of it.
Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
Can a class have multiple subclasses?
When is the garbage collection used in Java?
What is private static class in java?
How do you compare objects in java?
What is the difference between exception and error in java?
Explain java thread life cycle.
What is the main use of java?
What are different types of constants?
What is java argument list?
Define inheritance?
What are the 7 types of characters?
What is meant by stack and queue?
What is meant by flickering?
What is collection api?
What is an argument java?