+ 5

what is finalizer ?

what is finalizer and how it is used in java ?

17th Mar 2021, 8:16 PM
R SHAMBHAVI PILLAI
R SHAMBHAVI PILLAI - avatar
3 Answers
+ 3
In very simple terms, the finalize() method is generally called before an object is garbage collected. You can override the method to release some resources before exiting the program.
17th Mar 2021, 8:40 PM
Avinesh
Avinesh - avatar
+ 4
I saw this article.I hope it helps.. "A Guide to the finalize Method in Java | Baeldung" https://www.baeldung.com/java-finalize Happy coding
17th Mar 2021, 8:18 PM
!Derrickee
!Derrickee - avatar