Java八种基本类型及其包装类总结

原始类型 包装类 原始类型所占的字节数  
 short    Short       2个字节                        
 int        Integer     4个字节
 long     Long        8个字节
 float     Float       4个字节
 double  Double   8个字节
 byte      Byte        1个字节
 char      Character  2个字节
 boolean Boolean 这个试编译环境而定

八种类型默认值  

基本类型  默认值

byte       0

int          0

short                   0 

long         0L

double       0.0d

float      0.0f

char       'u0000' 

boolean    false

原文地址:https://www.cnblogs.com/leilong/p/8643868.html