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 is a and has a relation ship in oops concept in java?

9 Answers   TCS, BearingPoint,

what is tempplate pattern

4 Answers   RBS, IBM,

What are the names of interfaces that doesn't consists of method/s ?

3 Answers  

Name the method of a Container that can be used to cause a container to be laid out and redisplayed?

1 Answers  

Is Java is 100% pure OOPS? Explain?

27 Answers   ANZ,

system.out.println(1 + 3);

8 Answers  

Real Time sample code for Encapsulation and Abstraction. where to use abstract and where to use specifies like public private.

2 Answers  

how to make hashmap object as synchronized object?

2 Answers   BOB Technologies,

what is java

3 Answers   Tech Mahindra,

Java violates few objected oriented concepts. Can you explain in what way?

3 Answers   Ness Technologies,

what is difference between perfom() & excute() ?

2 Answers   IBM,

Can we have a abstract class withought any method? What is a purspose of this?

3 Answers