...
A solution to these problems is to declare meaningfully-named constants as class variables. Their values can be set to the desired literals, and these constants referenced inserting throughout the program rather than inserting the literals themselves. The advantages to this approach are that the constant's name can clearly indicate its meaning or intended use, and should the constant need to be changed, its declaration can be modified without having to search the entire code for all its occurrences.
...
The final
keyword in Java is used to declare constants. Its effect is to render the affected variable immutable. Attempting to change the value of a final
-qualified variable results in a compile-time error. Because As constants cannot be changed, it is desirable to define only one instance of them for the class; therefore constants should be declared with the static
modifier as well. (DCL31-J. Qualify mathematical constants with the static and final modifiers)
...