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


Please Help Members By Posting Answers For Below Questions

Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?

566


What is the difference between preparedstatement and statement in java?

542


How would you format a date in java? I.e. In the ddmmyyy format?

759


Can we override static methods in java?

575


What is the difference between state-based unit testing and interaction-based unit testing?

489






When is update method called?

661


Explain polymorphism citing an example.

582


Difference between class#getinstance() and new operator ?

638


How will you call an Applet using Java Script Function?

534


What is an object's lock and which object's have locks in java programming?

561


What is ++ a in java?

561


Can a static member function access member variable of an object?

554


What is empty string literal in java?

553


What is pass by value?

506


How can an exception be thrown manually by a programmer?

501