单选题

下列程序的输出结果是(  )。
public class Test{
public static void main(String[]args){
int[]array=(2,4,6,8,lO);
int size=6;
int result =-1:
try{
for(int i=0;i(size 8L&result= = -1;)
if(array[i]= =20)result=i:
}
catch(ArithmeticException e){
System.out.println("Catch- - -l");
}
catch(ArraylndexOutOfBoundsException e){
System.out.println("Catch- - -2");
}
catch(Exception e){
System.out.println("Catch- - -3");)
}
}

发布于 2022-05-11 10:33:07

登录后免费查看答案
关注者
0
被浏览
18
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看