WHAT IS FINALIZE METHOD ?

Mayank Tripathi

Total Post:807

Points:4035
Posted by  Mayank Tripathi
Java 
 556  View(s)
Ratings:
Rate this:
  1. Mayank Tripathi

    Post:807

    Points:4035
    What is finalize method ?

    The Object class has a special method named finalize() that is called by garbage collector to allow an object to do the necessary cleanup that needs to occur before the memory used by the object are reclaimed. The finalize() method can be overridden by any class that uses system resources (file , db connection) and needs to release those resources or to perform other cleanup as part of implicit destruction by the garbage collector.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!