Java is a strongly typed language, which means that one type must be declared for each variable.
Java Integral type
Long 8 byte value range-922 3372 0368 5477 5808~922 3372 0368 5477 5807
int type 4 byte value range -2147483648~2147473647 (just over 2 billion)
The min=0x80000000 (8 after 7 0) max=0x7fffffff (7 after 7 F) is better remembered with 16 binary.
Short 2-byte value range -32768~32767
BYTE 1 byte value range -128~127
Long integer values have a suffix l (e.g., 0000 0000L). Hexadecimal values have a prefix of 0x (such as 0xCAFF). The octal number has a prefix of 0, for example, the octal number 010 is converted to decimal 8. Starting with the JAVA7 prefix 0b can represent a binary number, for example, the 0b1000 is converted to a decimal after 8. Also, starting with Java7, you can underline a number literal, such as 1_000_000 (or 0b1111_0100_0010_0100_0000), which represents 1 million. These underscores are only intended to make people more readable, and the Java compiler will remove these underscores.
Attention
Java No any unsigned type (unsigned).
Java floating point type
A double indicates that the numeric precision of this type is twice times the type of float (some call it a double-precision value).
A value of type float has a person suffix f (for example, 3.14F). Floating-point values that do not have a suffix (such as 3.14) default to a double type, and, of course, a suffix D (for example, 3.14D) after floating-point values.
Java Data types