Can an unreachable object become reachable again?

Answers were Sorted based on User's Feedback



Can an unreachable object become reachable again?..

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 ?    19 Yes 1 No

Can an unreachable object become reachable again?..

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

Can an unreachable object become reachable again?..

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 anagram number?

0 Answers  


What is main in java?

0 Answers  


How many ways can an argument be passed to a subroutine and explain them?

0 Answers  


How does the garbage collector works in java?

0 Answers   Cyient,


What is the similarity between dynamic binding and linking?

0 Answers  






java can provide security ,how can provide?

8 Answers   Aspire, BNP Paribas, Genpact, IBM,


What are scriptlets?

0 Answers  


What is an empty class? What functionality does it offer in Java?

0 Answers   Deloitte, EXL, JPMorgan Chase,


how cani read a command line argument?(usingfile object).

3 Answers  


How to invoke external process in java.

0 Answers  


Are static members inherited to sub classes?

0 Answers  


What are the limitations of procedural programming approach?

0 Answers   Amdocs,


Categories