+ 2
Can someone explain the finalize() method in java?
4 Respostas
+ 3
Kurtis Odom No. Finalize is used to perform clean up processing just before object is garbage collected. And the final keyword is used before the method_name to prevent it from overriding.
+ 2
My previous answers were wrong. The finalize method is used to prevent overriding of a method by a subclass. If a method is finalized, it cannot be overridden.
+ 1
so do we have to call it explicitly everytime or it is an automatic process? and what would happen if we do not use it?