Java Reference
In-Depth Information
pression.
Compile-time constant expressions of type
String
are always “interned” so as to share
unique instances, using the method
String.intern
.
A compile-time constant expression is always treated as FP-strict (§
15.4
), even if it occurs
in a context where a non-constant expression would not be considered to be FP-strict.
statement to complete normally (§
14.21
), and the type of a conditional operator
? :
with numeric operands.
Example 15.28-1. Constant Expressions
true
(short)(1*2*3*4*5*6)
Integer.MAX_VALUE / 2
2.0 * Math.PI
"The integer " + Long.MAX_VALUE + " is mighty big."