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 a static class in java?
What does singleton mean in java?
How many types of operators are there?
What is byte [] in java?
What is binary tree in java?
Is string serializable in java?
What is a parameter used for?
What is size () in java?
we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.
What is the differences between heap and stack memory in java? Explain
Is string a data type in java?
What is member in java?
What is the use of default method in interface in java? Explain
Can we override a variable in java?
Explain different states of a thread in java?