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 is the Use of Jsp:useBean in JSP ?

Why Should You Define a Default Constructor in Java ?

What is the Advantage of Using Unicode Characters in Java ?

How Will You Use Other Java Files of Your Application in JSP Code ...

How Will You Handle InterruptedException in Java ?