finalKeywords do not allow you to modify or replace their original values or definitions. finalkeywords can be used in the following three contexts:
Variable declaration
class declaration
Method declaration
Final variable
If a variable is declared final , it can only be assigned a value once. finalthe value of the variable cannot be modified after it is set. Variable declarations include declarations of local variables, form parameters of methods/constructors, instance variables, and class variables. To declare a variable as final , use the keyword in the variable declaration final .
finalThe value of a variable is set only once, and it cannot be re-assigned. There are two ways to initialize final the value of a variable:
However, it must be initialized before the variable is read for the first time final .
Click on the link to view the details
Java Final keyword