首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
阅读下列程序片段 Publicvoidtest(){ Try{ sayHello(); system.out.println(“hello"); }catch(ArrayIndexOutOfBoundExceptione){
阅读下列程序片段 Publicvoidtest(){ Try{ sayHello(); system.out.println(“hello"); }catch(ArrayIndexOutOfBoundExceptione){
admin
2010-04-08
43
问题
阅读下列程序片段 Publicvoidtest(){ Try{ sayHello(); system.out.println(“hello"); }catch(ArrayIndexOutOfBoundExceptione){ System.out.println(“ArraylndexOutOfBoundException”); }catch(Exceptione){ System.out.println(“Exception”); }finally{ System.out.println(“finally”); } } 如果sayHello()方法正常运行,则test()方法的运行结果将是( )。
选项
A、Hello
B、ArraylndexOutOfBondsException
C、Exception Finally
D、Hello Finally
答案
D
解析
sayHello()方法正常运行则程序不抛出异常,并走finally,所以为D。
转载请注明原文地址:https://kaotiyun.com/show/699p777K
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
数据处理的最小单位是()。
详细设计的结果基本决定了最终程序的()。
数据库恢复是将数据库从()状态恢复到某一已知的正确状态。
()是数据库设计的核心。
数据库管理系统中负责数据模式定义的语言是
结构化程序设计中,下面对goto语句使用描述正确的是
下面代码的输出结果是vlist=list(range(5))print(vlist)
关于CSV文件的描述,以下选项中错误的是
关于Python数字类型,以下选项中描述错误的是
下列哪个数代表八进制整数?
随机试题
患者,女,38岁。近两天来无明显诱因出现高热,体检除显著贫血貌外,无特殊阳性体征。实验室检查:外周血象全血细胞减少,网织红细胞明显减少;骨髓象提示骨髓增生低下。该患者最可能的诊断是
A.四环素B.螺旋霉素C.甲硝唑D.青霉素E.交沙霉素下列疾病治疗时,若用抗生素治疗应首选的药物
主要兴奋B受体的拟肾上腺素药是
在下列各项中,医师可以行使特殊的干涉权的是
城市地下铁道岩石的饱和极限抗压强度fr=20MPa,属于()。
证券投资的管理成本包括()
企业持有的—年内到期的长期债券投资应征资产负债表的()项目列示。
南宋词人______在《扬州慢》中有“过春风十里,______”之句,描绘了遭战争洗劫后扬州城的荒芜景象,令人感叹。
幼儿在家中和学校里看到了大量的桌子,掌握了“桌子”的概念,幼儿对于“桌子”这个概念学习的方式是
WhatisitaboutAmericansandfood?Welovetoeat,butwefeel【S1】______aboutitafterward.Wesaywewantonlythebest,but
最新回复
(
0
)