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
How do you override a private method in java?
In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?
Explain the difference between string, stringbuffer and stringbuilder in java?
What is the difference between final, finally and finalize()?
Which is dependent variable?
Is a boolean 1 bit?
Difference between keyword and identifier.
Write a code to show a static variable?
Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?
What are local variables?
What is a class component?
how to prepare for IT Officers Interview in Banks
Is java an ide?
How to find the index of the largest number in an arraylist java?
What is the use of isempty in java?