在oneMethod( )方法运行正常的情况下,程序段将输出( )。 public void test( ){ try {oneMethod( ); System.out.println ("condition 1"); }catch (ArratlndexOutOfBoundException e){ System.out.println("condition2"): }catch (Exception e){ System.out.println("condition 3"); }finnally{ System.out.println("finally"): } }
A.condition 1
B.condition2
C.condition 3
D.condition 1 finally
第1题:
在oneMethod()方法运行正常的情况下,程序段将输出public void test(){ try { oneMethod(); System.out.println("condition 1"); } catch(ArrayIndexOutOfBoundsException e){ System.out.println("condition 2"); } catch (Exception e) { System.out.println("condition 3"); } finally { System.out.println("finally"); }}
A.condition 1
B.condition 2
C.condition 3
D.condition 1 finally
第2题:
在oneMethod( )方法运行正常的情况下,程序段将输出什么? public void test( ){ try { oneMethod( ); System.out.println("condition 1"); } catch (ArrayIndexOutOfBoundsException e){ System.out.println("condition 2"); } catch(Exception e){ System.out.println("condition 3"); } finally { System.out.pritln("finally"); } }
A.condition 1
B.condition 2
C.condition 3
D.condition 1
第3题:
在oneMethod()方法运行正常的情况下,程序段将输出什么? ( ) public void test() { try { oneMethod(); System.out.println("condition 1"); } catch(ArrayIndexOutOfBoundsException e) { System.out.println("condition 2"); } catch(Exception e) { System.out.println("condition 3"); } finally { System.out.println("finally");
A.condition 1
B.condition 2
C.condition 3
D.condition 1 finally
第4题:
关于下面程序,( )的结论是正确的。
publicclassJ_Test{
publicstaticvoidmain(String[]args){
try{
return;
}
finally{
System.out.println("1");
}
}
}
A、上面程序含有编译错误
B、上面程序在运行时会产生一个运行时异常
C、上面程序会正常运行,但不产生任何输出
D、上面程序输出“1”
第5题:
在oneMethod()方法运行正常的情况下,程序段将输出______。 public void test() { try{ oneMethod(); System.out.println("ndition 1"; } catch (ArrayIndexOutOfVoundsException e){ System.out.println("ondition 2"; } catch (Exception e){ System.out.println("ondition 3"; } finally{ System.out.println ( "inally"; } }
A.condition1
B.condition2
C.condition3
D.condition1 finally