最新NIIT考试题目

时间:2015-04-29 05:28:03
【文件属性】:
文件名称:最新NIIT考试题目
文件大小:2.16MB
文件格式:DOC
更新时间:2015-04-29 05:28:03
考试 Java考试: 写出以下程序的运行结果。 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 ); } }

网友评论

  • Java ee的试题,不是java的。文不对题。