JAVA类的成员变量的默认值

类的成员变量不是不需要赋值,而是会自动初始化。
boolean false
char ‘\u0000’(null)
byte (byte)0
short (short)0
int 0
long 0L
float 0.0f
double 0.0d
String null

猜你喜欢

转载自blog.csdn.net/qq_37365385/article/details/80783379