房天下 > 房天下问答 > 业主生活 > 其他
  • 写出以下程序的运行结果 。

    写出以下程序的运行结果 。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("ArithmeticException is caught! "); } catch( Exception e ) { System.out.println("Other Exception is caught!");} finally{ System.out.println("finally is excuted!"); } }public static void main( String args[] ){ Proc( 0 ); Proc( 1 ); }}

    提问者:gjh628

    发布于2010-10-29

共1个回答
  • wyyl08 丨Lv 0
    0finally is excuted!1finally is excuted!
    +1 2010-10-29 举报
热门人气推荐
免责声明:问答内容均来源于互联网用户,房天下对其内容不负责任,如有版权或其他问题可以联系房天下进行删除。