题目内容
(请给出正确答案)
[判断题]
给定以下代码段:inta,b=0;则a的初始值是0。()
答案
查看答案
第1题
A.因为第三行的错误不能编译
B.因为第三行的错误运行时崩溃
C.输出5
D.输出20
第2题
第3题
A.-1
B.368
C.3689
D.9
第7题
阅读以下程序,给出运行结果。
classMultiCatch{
publicstaticvoidmain(Stringargs[]){
try{
inta=args.length;
intb=44/a;
intc[]={2,6};
c[44]=100;
System.out.println("b="+b);
}catch(ArithmeticExceptione){
System.out.println("除0异常");
}catch(ArrayIndexOutOfBoundsExceptione){
System.out.println("数组超越边界异常");
}finally{
System.out.println("程序执行结束");
}
}
}
运行结果是:
第9题
A.定义了一个名为a的一维数组
B.a数组有3个元素
C.a数组的下标为1~3
D.数组中的每个元素是整型