题目内容:
下列代码的执行结果是( )。 public class Test{ public static void main(String[]args){
int[]x={0,1,2,3};
for{int i=0;i<3;1+=2){
try{
systcm.OUt.println(x[i+2]/x[i]+x[i+1]);
}catch(ArithmeticException e){
System.OUt.println("errorl"):
}catch(Exception e){
System.OUt.println("error2"):
}
}
}
} A.errorl
B.error2
C.errorl orror2
D.2error2
参考答案:
答案解析: