Java Reference
In-Depth Information
HexDigits:
HexDigit
HexDigit HexDigitsAndUnderscores
opt
HexDigit
HexDigit: one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
HexDigitsAndUnderscores:
HexDigitOrUnderscore
HexDigitsAndUnderscores HexDigitOrUnderscore
HexDigitOrUnderscore:
HexDigit
_
An octal numeral consists of an ASCII digit
0
followed by one or more of the ASCII digits
0
through
7
interspersed with underscores, and can represent a positive, zero, or negative
integer.
OctalNumeral:
0
OctalDigits
0
Underscores OctalDigits
OctalDigits:
OctalDigit
OctalDigit OctalDigitsAndUnderscores
opt
OctalDigit
OctalDigit: one of
0 1 2 3 4 5 6 7
OctalDigitsAndUnderscores:
OctalDigitOrUnderscore
OctalDigitsAndUnderscores OctalDigitOrUnderscore
OctalDigitOrUnderscore:
OctalDigit
_
Note that octal numerals always consist of two or more digits;
0
is always considered
to be a decimal numeral - not that it matters much in practice, for the numerals
0
,
00
,
and
0x0
all represent exactly the same integer value.
A binary numeral consists of the leading ASCII characters
0b
or
0B
followed by one or
more of the ASCII digits
0
or
1
interspersed with underscores, and can represent a positive,
zero, or negative integer.