Constants, finals in Java, are defined using the keyword
As you know, constants should be used for most values in a program
so if they need to be changed, you change them in one place instead
of many places. Notably, static array sizes are constants.
Constants are typically defined globally since they cannot be changed,
and many units may need to know about them.
Often all constants are kept in one .h file that is included (#include)
in the .cpp files.
Suppose you want to define the maximum size of an array to be 100.
You can do this in one of two ways:
int const MAXSIZE = 100;
Reading right to left as is done in C++, the first reads MAXSIZE is
a constant integer. The second reads MAXSIZE is an integer constant.
These are equivalent, although be aware that swapping the const
and int in other situations does not always give equivalent definitions
(e.g., mixing const and pointers).
const int MAXSIZE = 100;
It is a universal style to capitalize all constant identifiers.