首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
1请阅读下列程序代码,然后将程序的执行结果补充完整。 public class throwsExcepfion{ static void Proc(int se1) throws ArithmeticException,Arr
1请阅读下列程序代码,然后将程序的执行结果补充完整。 public class throwsExcepfion{ static void Proc(int se1) throws ArithmeticException,Arr
admin
2010-07-28
22
问题
1请阅读下列程序代码,然后将程序的执行结果补充完整。
public class throwsExcepfion{
static void Proc(int se1)
throws ArithmeticException,ArraylndexOutOfBoundsException {
System.out.println("in Situation"+se1);
if(se1==0){
System.out.println("no Exception caught");
return;
}else if(se1==1){
int iArray[]=new int[4];
iArray [1]=3;
}
}
public static void main(String args[])[
try{
Proc(0);
Proc(1);
} catch(ArraylndexOutOfBoundsException e) {
System.out.println("Catch"+e);
}finally{
System.out.println("in Proc finally");
}
}
}
执行结果:
In Situation()
no ExcepbOn cauSht
【 】
in Proc findly
选项
答案
In Situation1
解析
转载请注明原文地址:https://jikaoti.com/ti/CDH0FFFM
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
软件(程序)调试的任务是
有三个关系R、S和T如下:则由关系R和S得到关系T的操作是
冒泡排序在最坏情况下的比较次数是
下列叙述中正确的是
下列描述中错误的是
给出如下代码:TempStr=’’HelloWorld’’以下选项中可以输出“World”子串的是
Python为源文件指定系统默认字符编码的声明是
Python语句:f=open(),以下选项中对f的描述错误的是
将自然数集设为整数类I,则下面属于类I实例的是()。
计算机网络分为局域网和广域网,因特、网属于________。
随机试题
最符合急性淋巴细胞白血病描述的是
A、虚寒证B、热证C、湿浊下注D、热伤血络E、实寒证小便量少而黄赤者可见于
两家及两家以上商业保险公司根据省政府授权,经营运作全省政策性农业保险项目,按照章程约定的比例,分摊保费、承担风险、享受政策、共同提供保险服务,这种保险模式是()。
阅读下列材料,回答问题。材料一苏格拉底说:“如果知识包括了一切的善,那么我们认为美德即知识就将是对的。”孟子说:“爱人者,人恒爱之;敬人者,人恒敬之。”材料二明清时期的早期启蒙思想家们先天不足,具有一种时代性的缺陷……黄宗羲、唐甄们提不出新
原告张某与邻居李某共同外出经商,二人因利润分配发生争执。某日李某到原告家索要,与原告发生争执,并发生厮打,后原告将李某打伤。事后,原告所在乡派出所几次找到原告要求其承担李某医药费,原告拒付。据此,原告所在地的市劳动教养工作领导小组,对原告作出劳动教养2年的
属于对额外变量进行实验前控制的方法是
Wemaylookattheworldaroundus,butsomehowwemanagenottoseeituntilwhateverwe’vebecomeusedtosuddenlydisappears.
"Wehavetoputitonthetopoftherightcomer."Theword"it"heremeans______.Fromthepassage,weknowwhenwewritean
Notonlydothesesmallbusinessesprovidethesuccessstoriesofthefuture,buttheyalsomeettheneedsofthelocalpeople.
【S1】【S8】
最新回复
(
0
)