试题来源:2014年计算机二级JAVA考试精选选择题(6)
【单选题】下列程序的输出结果是(      )。  
Public class Test{ 
Public static void main(String[]args){ 
int[]array=(2,4,6,8,10);  
int size=6;  
int result=-l:  
try{ 
for(int i=0;iif(array[i]= =20)result=i:  
} 
catch(ArithmeticException e){ 
System.out.println("Catch---1");  
} 
catch(ArraylndexOutOfBoundsException e){ 
System.out.println("Catch---2"):  
} 
catch(Exception e){ 
System.out.println("Catch---3"):  
} 
} 
A.Catch---1  
B.Catch---2 
C.Catch---3  
D.以上都不对
试题出处:http://www.examtiku.com/shiti/811878692.html
网考网参考答案:B
网考网解析:进入考试题库查看解析
大数据分析:根据网考网与考试题库的统计分析,该试题:
6%的考友选择了A选项 
74%的考友选择了B选项 
4%的考友选择了C选项 
16%的考友选择了D选项 
考友解析与评论:
 · 为什么选这个,有没有大神解答一下
 · 像这种考试,没什么技术含量,全靠运气。
 · 我全答错了
							
	          			
发布评论 查看全部评论