Java Reference
In-Depth Information
FloatingPointLiteral
BooleanLiteral
CharacterLiteral
StringLiteral
NullLiteral
The type of a literal is determined as follows:
The type of any other floating-point literal is
double
and its value must be an ele-
ment of the double value set (§
4.2.3
).
reference.
Evaluation of a lexical literal always completes normally.
15.8.2. Class Literals
A
class literal
is an expression consisting of the name of a class, interface, array, or prim-
itive type, or the pseudo-type
void
, followed by a '
.
' and the token
class
.
Class<
C
>
.
the type of an expression of type
p
after boxing conversion (§
5.1.7
).