A variable can be declared final. A final variable may only be assigned to once. It is a compile-time error if a final variable is assigned to unless it is definitely unassigned immediately prior to the assignment. After the assignment of any final variable, it can never be altered. If the variable refers to any ...