How GC (Garbage Collector) knows the objects reference is
unused.Whether GC removes the unused object Parmanently or
it maintains something.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / balamurugan
it checks whenever we will not used the objects in our
program then jvm checked with forward referenceduse help of
heap memory. then gb removes the un used objects
Is This Answer Correct ? | 1 Yes | 0 No |
What is the SimpleTimeZone class?
What’s the difference between callable and runnable?
What is the difference between abstract classes and interfaces?
What class allows you to read objects directly from a stream?
What is CardLayout?
What is general methodology?
How to print an arraylist in java?
Can a class have a static inner class?
What type of variable is error flag?
What is the most important feature of java? What is an interface?
What is hard code & soft code?
What are internal variables?