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
Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?
What is the difference between preparedstatement and statement in java?
How would you format a date in java? I.e. In the ddmmyyy format?
Can we override static methods in java?
What is the difference between state-based unit testing and interaction-based unit testing?
When is update method called?
Explain polymorphism citing an example.
Difference between class#getinstance() and new operator ?
How will you call an Applet using Java Script Function?
What is an object's lock and which object's have locks in java programming?
What is ++ a in java?
Can a static member function access member variable of an object?
What is empty string literal in java?
What is pass by value?
How can an exception be thrown manually by a programmer?