What is the difference between final , finally and finalize ?

There are so many differences between final , finally and finalize in java language. important differences are given below

Final Finally Finalize
It is a Keyword It is a Block It is a Method
It is used to apply restrictions on Class, Method and variables. Final class can’t be inherited, final method can’t be overridden and final variables can’t be changed. It is used to place important code, it will be executed whether exception is handled or not. It is used to perform clean up processing just before object garbage collected.


Leave a Reply