In Java, you can divide data types into two kinds of numeric types and Boolean types:
Integral type
int an int integer that occupies 32 bits in memory, and the range of tables is:-2147483648 (-) to 2147483647 (-1).
"Long a long integer in memory occupies 64 bits, the range of tables is:-9223372036854775808 (-) to 9223375036854775807 (-1)
"Bype a Bype-type integer that occupies 8 bits in memory, and the range of tables is:-128 (-) to 127 (-1)
Short a short integer occupies 16 bits in memory, and the range of tables is:-32768 (-) to 32767 (-1).
The Java integer constant is the int type by default, and in addition, there are two situations that must be noted:
If you assign a small integer constant (in the range of Bype or short tables) to a bype or short variable, the system automatically treats the integer constant as a bype or short type.
If you use a huge integer constant (beyond the range of table numbers of type int), Java does not automatically treat this integer constant as a long type. If you want the system to treat an integer constant as a long type, you should add L or L as the suffix after the integer constant. L is usually recommended because L is easy to mix with 1.
Still in the middle of the revision ...
java--Basic data Types detailed