题目内容:
请阅读下列程序代码,然后将程序的执行结果补充完整。横线处应填写的内容是( )。 程序代码:
public class throwsExeeption{
static void Proc(intsel)
throws Arithmetic Exception,Array Index Out Of
Bounds Exception{
System.out.println("InSituation"+sel);
if(sel= =0){
System.OUt.println("noException caught");
return;
}
else if(sel= =l){
int iArray[]=newint[4];
iArray[1]=3;
}
}
public static void main(String args[]){
try{
Proe(O);
Proc(1);
}
catch(Array Index Out Of Bounds Exception e){
System.out.println("Catch"+e);
}
finally{
System.out.println("inProcfinally"):
}
}
}
执行结果:
In Situation 0
no Exception caught
in Proc finally A.In Situation l
B.In Situation
C.with Catch
D.int iArray l
参考答案:
答案解析: