java 8种基本数据类型及封装类及默认值

java 是一种强类型语言 每个变量都需要声明其类型
8 种基本类型
byte short int long  float double  boolean  char
 Byte Short Interger  Long Float Double Boolean Character
   基本类型       默认值    
byte 0
short 0
int 0
long 0L
float 0.0f
double 0.0d
char '\u0000'
boolean false

你可能感兴趣的:(玩转java,java,数据类型,封装了哦)