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 garbage collection in Java, and how can it be used ?
32 Answers Accenture, HCL, Infosys, Sara, SITS, TCS, Wipro,
how cani read a command line argument?(usingfile object).
Why are functions called methods in java?
int a=10,b=20,c=30 a= b+c;b=a+c;c=a+b; System.out.println("The value is"+a+b+c;
How does hashset work in java?
Is treeset sorted in java?
how to make the double-tone class ? as we have singletone class..?
What is a native method?
what is the life cycle of jsp?
What is the difference between size and length in java?
What are access modifiers in Java ?
What is hash method?