What is Final keyword in JAVA

As the name indicates, it is the end and it cant  be modified after that. Final keyword is applicable to class/local variables, methods and class.

            i] Variables which are marked with FINAL keyword are constants.
           ii] Methods marked with FINAL will not be overloaded
  iii] Class marked with FINAL will not be inherited.
  iv] Abstract class should not be marked as FINAL.


Example of final variable:

                       final int value=10;


Previous
Next Post »