Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8
Finalize() is the method of Object class. This method is called just before an object is garbage collected. finalize() method overrides to dispose system resources, perform clean-up activities and minimize memory leaks.it throws Throwable exception. Syntax :-protected void finalize()  throws Throwable
2nd Sep 2019, 7:45 AM
Prathvi
Prathvi - avatar
+ 5
No, it isn't deconstructor zemiak, but DESTRUCTOR.
2nd Sep 2019, 10:13 AM
Aleksandar Nedeljkovic
Aleksandar Nedeljkovic - avatar
+ 4
And Abhishek Jain are right about explanation 👌🏻👍🏻
2nd Sep 2019, 10:14 AM
Aleksandar Nedeljkovic
Aleksandar Nedeljkovic - avatar
+ 3
It is a destructor (the opposite of a constructor), but it is deprecated (thanks Aleksandar Nedeljkovic)
2nd Sep 2019, 8:08 AM
zemiak