栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 笔试题库

[填空题] 请阅读下列程序代码,然后将程序的执行结果补充完整。 程序代码: public class throwsExcepfionstatic void Proc(int se1) thro

笔试题库 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

[填空题] 请阅读下列程序代码,然后将程序的执行结果补充完整。   程序代码:   public class throwsExcepfionstatic void Proc(int se1) thro

[填空题] 请阅读下列程序代码,然后将程序的执行结果补充完整。

程序代码:

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

【14】

in Proc findly

正确答案:

In Situation1

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/481054.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号