Java基本数据类型和长度

java数据类型     字节  表示范围

byte(字节型)     1  -128~127 
short(短整型)    2 -32768~32767 
int(整型)        4  -2147483648~2147483647 
long(长整型)     8  -9223372036854775808 ~ 9223372036854775807 
float(浮点型)    4  -3.4E38~3.4E38 
double(双精度型) 8  -1.7E308~1.7E308 
char(字符型)     2  从字符型对应的整型数来划分,其表示范围是0~65535 
boolean(布尔型)  1  true或false

原文地址:https://www.cnblogs.com/huangsheng/p/3373229.html