二级二级JAVA2013年全国计算机等级考试二级JAVA上机临考冲刺试卷(1)
题目内容

下列程序的输出结果是(  )。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");)}}

2024-07-09

A.Catch- - -1

B.Catch- - -2

C.Catch- - -3

D.以上都不对

题目答案

试卷相关题目

最新试卷
热门试卷

长理培训客户端 资讯,试题,视频一手掌握

去 App Store 免费下载 iOS 客户端