详细介绍Java 八大Primitive数据类型

类型 位数 值域
boolean java虚拟机决定 true或false
char 16bits(2个字节) 0~65535
byte 8bits(1个字节) -128~127
short 16bits(2个字节) -32768~32767
int 32bits(4个字节) -2147482648~2147483647
long 64bits(8个字节)
-很大~+很大(楼主是记不得)
float
32bits(4个字节)
范围规模可变     
double 64bits(8个字节) 范围规模可变   
注:byte、short、int、long为数值(带正负号)。float、double为浮点型!

猜你喜欢

转载自blog.csdn.net/wyj823508/article/details/79853626