运行异常经常有算术异常、空指针异常、【 】、数组负下标异常和数组索引越界异常。
第3题
public Throwable(String messaSe)构造函数包含getMessage()方法,用来返回带参数构造函数创建异常时的参数内容,对无参数构造函数而言,用它返回的是【 】。
请帮忙给出正确答案和分析,谢谢!
第4题
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
请帮忙给出正确答案和分析,谢谢!
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!