What is garbage collection in Java, and how can it be used ?
Answer Posted / jaffer
Actually garbage collector is a daemon thread. Normally
JVM’s heap stores all objects which is created by new
operator. So objects are occupying memory in heap. Some
objects are not used for long time. So garbage collector do
that work automatically.
Otherwise we call finalization method
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is default locale java?
When do you call copy constructor?
Can this keyword be used to refer static members?
Does anyone still use java?
How does a for loop work?
What is method reference in java?
What are unchecked exceptions in java?
how is final different from finally and finalize in java?
What is string in java with example?
What is a void method?
What are the various access specifiers for java classes?
Can we rethrow the same exception from catch handler?
What are the parts of a method?
What is difference between this and super keyword?
when you will synchronize a piece of your code? : Java thread