How Can We Reference an Unreferenced Object Again in Java ?

We can provide implementation in finalize() method to reference and unreferenced object. For an unreferenced object, finalize() method is called at the time of Garbage Collection. At this time, Object can pass its reference ‘this’ to finalize() method and revive itself.



You May Interest

What are the Different States of a Thread in Java ?

What is Difference Between Include Directive and Include Action o ...

Enumeration and Iterator, Which One Has Better Performance in Jav ...

What is the Difference Between StringBuffer and StringBuilder in ...

What is a Singleton Class in Java ?