final VS finally VS finalize in Java

https:/‮www/‬.lautturi.com
final VS finally VS finalize in Java

Final

Final is used to apply restrictions on class, method, and variable.
The final class can't be inherited, final method can't be overridden, and final variable value can't be changed. Final is a keyword

Finally

Finally is used to place important code, it will be executed whether an exception is handled or not. Finally is a block. If you have a try/catch block you use otherwise, you cannot use it.

Finalize

Finalize is used to perform clean up processing just before an object is garbage collected. Finalize is a method.
Garbage Collector use it implicitly.

Created Time:2017-09-05 15:18:04  Author:lautturi