Example & Tutorial understanding programming in easy ways.

what is the purpose of finalize() method in java?

The finalize() method is invoked each time before the object is garbage collected. This method can be used to perform cleanup processing. This method is defined in System class as:
 protected void finalize(){}

Read More →