[
and ]
means inclusive, (
and )
means exclusive;
- primitive type
- numeric type
- integral type
- byte (8 bits signed two's-complement,
[-128, 127] / [-2^7, 2^7 - 1]
, default value0
); - short (16 bits signed two's-complement,
[-32768, 32767] / [-2^15, 2^15 - 1]
, default value0
); - int (32 bits signed two's-complement,
[-2147483648, 2147483647] / [-2^31, 2^31 - 1]
, default value0
); - long (64 bits signed two's-complement,
[-9223372036854775808, 9223372036854775807] / [-2^63, 2^63 - 1]
, default value0
); - char (16 bits unsigned represents unicode BMP's code points, utf-16 encoding,
[0, 65535]
, default value\u0000
/null
);
- byte (8 bits signed two's-complement,
- floating point type
- float (32bits, IEEE 754 standard, default value
+0
); - double (64bits, IEEE 754 standard, default value
+0
);
- float (32bits, IEEE 754 standard, default value
- integral type
- boolean type
- numeric type
- reference type
- null type: no name, can not direct declare; we can simply treat null as a special literal;
- strictly speak, null is not reference type;