In addtion to the uses of final to prevent overridden or Inheritance, final can also be applied to variables to create what amounts to named constants. If you precede a class variable's name with final, its value cannot be changed. below shows how to define a named constants in java and its same form in C++:
JAVA: final int ERRCODE = 10;
C++: const int ERRCODE = 10;
JAVA: final int ERRCODE = 10;
C++: const int ERRCODE = 10;