JavaSyntax
Declare a Constant
Code example
static final int MAX = 100;Declares a value that can't change.
In Java, declare a constant: declares a value that can't change — static final int MAX = 100;
static final int MAX = 100;static final int MAX = 100;Declares a value that can't change.
Use static final int MAX = 100;.
Use this pattern: static final int MAX = 100;
Yes. Use Copy code and adapt the example to your program.
No. The language syntax is the same across operating systems.