Compile-time calculation: Difference between revisions
m
Reformatting a long piece of text.
m (Reformatting.) |
m (Reformatting a long piece of text.) |
||
Line 839:
=={{header|Java}}==
<pre>
The Java compiler is able to calculate expressions that contain constant variables
and certain operators during code compilation.
As defined in the Java language specification,
the following operators and expressions may be used for constant expressions:
Unary operators: +, -, ~, !
Multiplicative operators: *, /, %
|