What is the difference between final, finalize and finally?


final is a Java keyword used to indicate that either a method can not override in a subclass, or a class can not be extended or a field can not be modified.finalize is a method that gets called on an instance of an Object when it is garbage collected.finally is a Java keyword used in exception handling to indicate a block of code that should always be run whether an exception is thrown or not.

0 answers