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 difference between hashset and hashmap?
What is a qualifier in a sentence?
What are the different approaches to implement a function to generate a random number?
How to compare strings in java?
Does treeset allow null in java?
What are the three types of design patterns?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread
What is a protected method?
In a class implementing an interface, can we change the value of any variable defined in the interface?
What is mean by encoding?
Is java jre still free?
How we can declare a static variable?
Which is fastest collection in java?
Explain the difference between protected and default access.
How do generics work in java?