首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
阅读下列程序片段。 Public void test(){ Try{ sayHello(); syste m.out .pri ntln("hello"); } catch (ArrayIndexOut OfBoundException e){ Syste
阅读下列程序片段。 Public void test(){ Try{ sayHello(); syste m.out .pri ntln("hello"); } catch (ArrayIndexOut OfBoundException e){ Syste
admin
2012-12-02
62
问题
阅读下列程序片段。
Public void test(){
Try{
sayHello();
syste m.out .pri ntln("hello");
}
catch (ArrayIndexOut OfBoundException e){
Syste m.out .pri ntln ("ArrayIndexOut OfBoundExcep-
tion");
}
catch(Exception e){
Syste m.out .pri ntln("Exception");
}
fi nally {
Syste m.out .pri ntln("fi nally");
}
}
如果sayHello()方法正常运行,则test()方法的运行结果将是( )。
选项
A、Hello
B、ArrayIndexOut OfBonds Exception
C、Exception Fi nally
D、Hello Fi nally
答案
D
解析
sayHello()方法正常运行则程序不抛出异常,并执行fi nally ,所以为D。
转载请注明原文地址:https://jikaoti.com/ti/o5kiFFFM
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
关于我国的水资源与水能,下列说法错误的是()。
张大来的原户籍所在地在杨村,1994年张大来从杨村开出迁住证,迁往李村。但在李村登记前,张大来得病,在县城医院住院一年零三个月。病愈后张大来前往北京市打工,并在某区办理了暂住证,居住期限为6个月,现住在某区某街道某号。现问,张的住所应确定为何处?(
春夏秋冬四季的循环往复变化使得地球景观绚丽多彩,这是大自然赋予地球的珍贵礼物。然而四季这个礼物似乎分配不公,地球上只有温带才有明显的四季变化,而寒带和热带则是长冬无夏和长夏无冬。其原因是()。
某区对用电的收费标准规定如下:每月每户用电不超过10度的部分,按每度0.45元收费;超过10度而不超过20度的部分,按每度0.80元收费;超过20度的部分,按每度1.50元收费。某月甲用户比乙用户多交电费7.10元,乙用户比丙用户多交3.75元,那么甲、乙
如果两变量之间存在正相关,且所有相关点都落在回归线上,则这两个变量之间的相关系数是()
下列属于程序法部门中的非诉讼程序法的是()
设某教学管理系统,其查询模块需要提供如下功能:Ⅰ.查询系信息,列出各系编号、系名和系办公电话;Ⅱ.查询某系教师的信息,列出教师号、教师名、工资和聘用日期;Ⅲ.查询某教师讲授的课程信息,列出课程号、课程名和学分;Ⅳ.查询讲授某门课程的教师信息,列出教
从功能角度数据库应用系统可以划分为四个层次,其中负责向表示层直接传送数据的是()。
某二叉树有5个度为2的结点,则该二叉树中的叶子结点数是()。
交换两个变量的值,不允许用临时变量,应该使用下列()位运算符。
随机试题
下列常用切线位摄影的是
在矿井通风方式中,()方式一般排风井数目较多,占用通风设备多。
按配置划分,计算机网络分为()。
检验检疫机构对代理报检单位实行年度审核制度。代理报检单位应当在每年()前向所在地直属检验检疫局申请年度审核,并提交上一年度的《年审报告书》。
关于专营店的特征,说法不正确的是()。
著名认知心理学家安德森认为,心智技能的形成需经过三个阶段,即认知阶段、联结阶段和________。
财务报表分析的主体是财务报表的使用者。根据报表主体的不同,其分析的具体内容包括()。
社会保险是指国家通过立法形式,采取强制手段而实施的一种保险。社会保险的险种包括()等。
[*]
A、Hehadn’ttalkedwithhisfatherforfiveyears.B、Hehadn’tmethisfatherforfiveyears.C、Hehadbeenquarrelingwithhis
最新回复
(
0
)