Can an unreachable object become reachable again?

Answers were Sorted based on User's Feedback

Answer / niranjanravi

Yes, an unreachable object may become reachable again.This
happens when the object's finalize() method is invoked and
the objct performs an operation which causes it to become
accessible to reachable objects.

Is This Answer Correct ?    16 Yes 1 No

Answer / 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

Answer / ravikiran(aptech mumbai)

yes an unreachable object may become reachable once it get a
reference befre garbage collection especially in finalize()
method call

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the need of "creating and throwing an UserdefinedException" when the "Exception" class is already available?

4 Answers  

what is use of session tracking ?with example?

1 Answers   Photon,

Why sleep()is in Thread and wait() in Object class? Why can't I have both in one class or vice versa?

1 Answers  

How to eliminate duplicates from an array?

6 Answers   Adobe, Patni, ABC, Wipro, College School Exams Tests, AdMod,

What are Access Specifiers and Access Modifiers.

6 Answers   TCS,

who can we create the object of a class? in how many ways we can create it (max 5)

2 Answers  

What is hypertext?

1 Answers  

Can a class inherit the constructors of its superclass?

9 Answers   Wipro, iFlex,

Why would you desing a J2EE application so user data is entered by way of a JSP page and managed by an underlying Java Beans class?

5 Answers   Adobe,

how many ways to create Thread and which one is good? runnable interface ot Thread class?

3 Answers   Satyam,

java is fullu object oriented or pure? why?

8 Answers  

What is the GregorianCalendar class?

2 Answers   HCL,