LEXICAL STRUCTURE
Integer Literals
3.10.1
The keywords
const
and
goto
are reserved by Java, even though they are not
currently used in Java. This may allow a Java compiler to produce better error
messages if these C++ keywords incorrectly appear in Java programs.
While
true
and
false
might appear to be keywords, they are technically
Boolean literals ( 3.10.3). Similarly, while
null
might appear to be a keyword, it
is technically the null literal ( 3.10.7).
3.10 Literals
A
literal
is the source code representation of a value of a primitive type ( 4.2), the
String
type ( 4.3.3, 20.12), or the null type ( 4.1):
Literal:
IntegerLiteral
FloatingPointLiteral
BooleanLiteral
CharacterLiteral
StringLiteral
NullLiteral
3.10.1 Integer Literals
See 4.2.1 for a general discussion of the integer types and values.
An
integer literal
may be expressed in decimal (base 10), hexadecimal
(base 16), or octal (base 8):
IntegerLiteral:
DecimalIntegerLiteral
HexIntegerLiteral
OctalIntegerLiteral
DecimalIntegerLiteral:
DecimalNumeral IntegerTypeSuffix
opt
HexIntegerLiteral:
HexNumeral IntegerTypeSuffix
opt
OctalIntegerLiteral:
OctalNumeral IntegerTypeSuffix
opt
IntegerTypeSuffix: one of
l L
19
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved