Java Reference
In-Depth Information
BinaryNumeral:
0 b BinaryDigits
0 B BinaryDigits
BinaryDigits:
BinaryDigit
BinaryDigit BinaryDigitsAndUnderscores opt BinaryDigit
BinaryDigit: one of
0 1
BinaryDigitsAndUnderscores:
BinaryDigitOrUnderscore
BinaryDigitsAndUnderscores BinaryDigitOrUnderscore
BinaryDigitOrUnderscore:
BinaryDigit
_
The largest decimal literal of type int is 2147483648 (2 31 ).
All decimal literals from 0 to 2147483647 may appear anywhere an int literal may appear.
It is a compile-time error if a decimal literal of type int is larger than 2147483648 (2 31 ), or
if the decimal literal 2147483648 appears anywhere other than as the operand of the unary
minus operator (§ 15.15.4 ) .
The largest positive hexadecimal, octal, and binary literals of type int - each of which rep-
resents the decimal value 2147483647 (2 31 -1) - are respectively:
0x7fff_ffff ,
0177_7777_7777 , and
0b0111_1111_1111_1111_1111_1111_1111_1111
The most negative hexadecimal, octal, and binary literals of type int - each of which repres-
ents the decimal value -2147483648 (-2 31 ) - are respectively:
0x8000_0000 ,
0200_0000_0000 , and
0b1000_0000_0000_0000_0000_0000_0000_0000
The following hexadecimal, octal, and binary literals represent the decimal value -1 :
0xffff_ffff ,
Search WWH ::




Custom Search