1 成员变量 public int ab
2 类 变量 public static int abc
都有默认值
--------------------------------------------------------------------------------------------------------
1 成员 常量 public final int tt
2 类常量 public final static int kkkk
其中 2 类常量
可以用static 块来 赋值
可以在 构造函数中赋值。
没有默认值 ,必须要指定 ,且 应该在生成对象前,就有值才行。所以赋值的地方有两个:
1 以用static 块来 赋值 (其中 2 类常量)
2 可以在 构造函数中赋值。
3 直接赋值 final int tt =23;;
--------------------------------------------------------------------------------------------------
局部变量
没有默认值,需要赋值。