写出以下程序的运行结果。
public class TryCatchFinally{
static void Proc( int sel ){
try{
if( sel==0 ){System.out.println("no Exception ");
return;}
else if( sel==1 ){  int i=0;        int j=4/i;}
}
catch( ArithmeticException e ) {
System.out.println("Catch "); }
catch( Exception e ) {
System.out.println("Will not be executed");}
finally{
System.out.println("finally");     }
}
public static void main( String args[] ){
Proc( 0 );     Proc( 1 );     }
}

发布于 2022-05-11 10:36:12

登录后免费查看答案
关注者
0
被浏览
87
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看