填空题

请阅读下列程序代码,然后将程序的执行结果补充完整。 程序代码: public class throwsException{ static void Proc(int sel) throws ArithmeticException,ArrayIndexOutOfBoundsException{ System.out.println("In Situation"+sel); if(sel==0){ System.out.println("no Exception caught"); return; }else if(sel==1){ int iArray[]=new int[4]; iArray[1]=3; } } public static void main(String args[]){ try{ Proc(0); Proc(1) }catch(ArrayIndexOutOfBoundsException e){ System.out.println("Catch"+e); }finally{ System.out.println("in Proc finally"); } } } 执行结果: In、Situation 0 no Exception caught 【 】 in Proc finally

答案: InSituationl
题目列表

你可能感兴趣的试题

填空题

设a = 8,则表达式 a > > > 2的值是【 】。

答案: B
填空题

【 】是字符的序列,也是组织字符的基本结构。

答案: 字符串
填空题

表达式2*5/2.5,1.0/2*5,1/2.3和5/3的计算结果分别是【 】。

答案: 4.0,2.5,0和1
填空题

Java不直接支持多继承,但可以通过【 】实现多继承。

答案: 接口 或interface 或实现接口
微信扫码免费搜题