Can an object be garbage collected while it is still
reachable?
Answer Posted / sudheer
Garbage collector is a low priority thread. We cant order to delete an object. When the object has no references and object which are out of scope will be deleted by the garbage collector to free the memory. So when an object is reachable it cant be garbage collected.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is lastindexof in java?
What is difference between calling start() and run() method of thread?
Is a char always 1 byte?
Why is java logo a cup of coffee?
What lambda means?
Why synchronization is important in java?
Is list thread safe in java?
How can we pass argument to a function by reference instead of pass by value?
What are the new features in java 8?
What is super keyword explain with example?
What is double parsedouble in java?
State some situations where exceptions may arise in java?
How do I type unicode?
Can java inner class be static?
Explain what access modifiers can be used for variables?