首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
阅读下列程序片段。 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
63
问题
阅读下列程序片段。
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://kaotiyun.com/show/06ID777K
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
下列人员中,可暂予监外执行的是()。
《中华人民共和国公务员法》规定,公务员的管理,坚持公开、平等、竞争、择优的原则,依照法定的权限、条件、标准和程序进行。公务员的任用,坚持任人唯贤、德才兼备的原则,注重()。
依据我国特别行政区基本法,下列哪个选项的表述是正确的?()
民族关系中的“三个离不开”是指()。
近年来,我国极地科学考察不断取得优异成绩,目前已在南北极建立了四个科学考察平台.在北极建立的是()。
关于我国土地资源,在下列选项中,阐述正确的是()。
凡论问题,皆要弄清文体的要素。人们习惯上把议论文分为三个要素,即论点、论据、论证。而任何议论首先要明确论辩的对象。叶圣陶先生在《文章例话》中说:“说明文以‘说明白了’为成功,而议论文却以‘说服他人’为成功。”叶先生讲作文深入浅出,没有花架子,遵循作文构思,
两变量相关系数为0.43,σX为5,σY为3,请问σYX为多少?()
以下不属于贷款风险五级分类管理中的类型的是()。
设某数据库中有旅客表A(旅客编号,城市)和旅客表B(旅客编号,城市),现将所有旅客的数据存储这两张表中。请补全如下查询语句,使得该查询语句能查询所有旅客所在的全部的不重复的城市。SELECT城市FROM旅客表A【14】SELECT城市FROM旅客表B
随机试题
不属于有机磷中毒临床表现的是
下列哪种情形属于自首?
甲公司为丙公司的全资子公司,于1992年11月经乙市市场监督管理局核准成立,注册资本1000万元,甲公司自开始经营以来内部管理一直存在严重问题,长年亏损。2017年度审计报告显示甲公司资产负债率超出100%,甲公司有签订劳动合同的职工27人,至今拖欠职工
计算机病毒是(52)。
操作系统中的文件管理系统为用户提供的功能是()。
假设某台计算机的内存容量为256MB,硬盘容量为40GB。硬盘容量是内存容量的
Whyisthemansoannoyed?
Whenisthefilmfestivalscheduledtostart?
TodaythecaristhemostpopularsortoftransportationinalloftheUnitedStates.Ithascompletelyre【77】thehorseasam【7
【S1】【S2】
最新回复
(
0
)