首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
运行下面的程序时,会产生( )。 public class Test{ public static void main(String args[ ] ) { int x =0; int
运行下面的程序时,会产生( )。 public class Test{ public static void main(String args[ ] ) { int x =0; int
admin
2010-07-28
29
问题
运行下面的程序时,会产生( )。 public class Test{ public static void main(String args[ ] ) { int x =0; int y = 2/x; int z[ ] = {1,2,4,6}; int p=z[4]; } }
选项
A、ArrayIndexOutOfBoundsExcePtion异常
B、NumberFormatException异常
C、ArithmeticException异常
D、ArithmeticException异常和ArrayIndexOutOfBoundsExcePtion异常
答案
4
解析
只能出现ArithmeticException异常,由于在程序第4行出现了这个异常后,程序就跳出,不能继续执行下去,因此不会出现ArrayIndexOutOfBoundsException异常。
转载请注明原文地址:https://jikaoti.com/ti/VBH0FFFM
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
下列与队列结构有关联的是()。
下列叙述中正确的是()。
下面不属于需求分析阶段任务的是()。
下面不属于软件需求分析阶段主要工作的是()。
下列关于数据库设计的叙述中,正确的是
根据域名代码规定,表示教育机构网站的域名代码是
下列排序方法中,最坏情况下比较次数最少的是
算法的空间复杂度是指
下面关于Python中类的继承,说法错误的是()。
下列Applet用于显示提供它的主机的IP地址。请选择正确的语句填入横线处。importjava.awt.*;importjava.awt.event.*;importjava.applet.Applet;impo
随机试题
女,12岁,发热2周,1周来右膝关节、左踝关节相继红肿痛并有活动障碍,心尖部有Ⅱ级BSM,末梢血白细胞15×109/L,N80%,HB120g/L,PLT156×109/L。确诊本病儿诊断的主要标准是
能对企业服务其顾客的能力构成直接影响的力量是()
治疗心、胃病的是()
根据《建设工程工程量清单计价规范》的规定,反应器安装的工程内容除本体安装外,还包括( )。
下列关于CAPM模型的主要思想说法错误的是()。
下列不属于我国个人贷款业务的是()。
给定资料1.过去,长期以牺牲环境为代价的粗放型经济发展方式造成了雾霾、水污染、土壤污染等一系列严重的环境问题,而依托“互联网+”技术支撑的分享经济这一新兴的经济业态,则成为绿色、可持续发展的未来选择。对于分享汽车服务的调查研究表明,分享汽车服
下列实验结果能够说明老年人相比年轻人,对无关刺激的抑制能力降低的是()
线性表是一个具有n个什么项目的有限序列?
ABestFriend?YouMustBeKidding![A]Fromthetimetheymetinkindergartenuntiltheywere15,RobinShreevesandherfriend
最新回复
(
0
)