一、类的普通属性
class Demo{
byte a;//0
short b;//0
int c;//0
float d;//0.0
double e;//0.0
long f;//0
boolean g;//false
}
二、方法的局部变量
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The local variable a may not have been initialized
必须初始化