A detailed introduction to the eight primitive data types in Java

Types of number of digits range
boolean java virtual machine decision true or false
char 16bits (2 bytes) 0~65535
byte 8bits (1 byte) -128~127
short 16bits (2 bytes) -32768~32767
int 32bits (4 bytes) -2147482648~2147483647
long 64bits (8 bytes)
- very big~+ very big (the landlord can't remember)
float
32bits (4 bytes)
Variable scale     
double 64bits (8 bytes) Variable scale   
Note: byte, short, int, and long are numeric values ​​(with positive and negative signs). float and double are floating point types!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325776387&siteId=291194637