更新时间2018-09-24 19:05:58
class Demo {
Boolean[] a=new Boolean[10];
public static void main(String []args) {
Demo demo=new Demo();
demo.display();
}
void display(){
System.out.println(a[9]);
}
}
a) 输出true;
b) 输出false;
c) 输出null;
d) 运行时错误.
java定义在类成员上默认值为null