+1 vote
in JAVA by
Difference between final, finalize and finally?

1 Answer

0 votes
by
The final is a modifier which you can apply to variable, methods and classes. If you make a variable final it means its value cannot be changed once initialized. finalize is a method, which is called just before an object is a garbage collected, giving it last chance to resurrect itself, but the call to finalize is not guaranteed. finally is a keyword which is used in exception handling along with try and catch. the finally block is always executed irrespective of whether an exception is thrown from try block or not.

Related questions

0 votes
asked Oct 18, 2019 in C Sharp by Robin
0 votes
asked May 3, 2021 in JAVA by Robindeniel
...