单选题
下列程序的执行结果是______。
public class Test {
public static void main(String[] args) {
int[] x={0,
i,2,3};
for(int i=0;i<3;i+=2) {
try{
System.out.println(x[i+2]/x[i]+x[i+1]);
}catch(ArithmeticException e) {
System.out.println("error1");
}catch(Exception e) {
System.out.println ("error2");
}
}
}
}
- A.error1
- B.error2
- C.error1 error2
- D.2 error2