Can an unreachable object become reachable again?
Answer Posted / rakesh kumar jha
YES, Finalization is a feature of the Java programming
language that allows you to perform postmortem cleanup on
objects that the garbage collector has found to be
unreachable. It is typically used to reclaim native
resources associated with an object.
When the garbage collector determines that obj is
unreachable, it notices that obj is finalizable -- as it
had been recorded upon allocation -- and adds it to the
JVM's finalization queue. It also ensures that all objects
reachable from obj are retained, even if they are otherwise
unreachable, as they might be accessed by the finalizer.
So, we can say that it can be reachable.
| Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
Can inner class be public in java?
What is final access modifier in java?
What is methods in java?
What are recursive functions? Give some examples?
How do you compare values in java?
Is string is a class in java?
Difference between java and javascript
What is the difference between method overriding and overloading?
What is the purpose of abstract class?
What is multi-catch block in java?
How do you take thread dump in java?
What are "class access modifiers" in Java?
Can you have two constructors in java?
Difference between arraylist and hashset in java?
What is stringbuffer in java?