阅读下列程序片段
public void test(){
try{
sayHello();
System.out.println("Hello");
}catch (ArrayIndexOutOfBoundException e) {
System.out.println("ArrayIndexOutOfBoundException");
}catch(Exception e){
System.out.println("Exception");
}finally {
System.out.println("Finally");
}
}
如果sayHello( )方法正常运行,则test( )方法的运行结果将是:
AHello
BArrayIndexOutOfBondsException
CException Finally
DHello Finally
相关试题
-
阅读下列程序片段 public void test(){ try{ sayHello(); System.out.println(Hello); }catch (Ar
-
hod()方法运行正常的情况下,程序段将输出什么? public void test(){ try{ oneMethod(); System.out.println(cond
-
System.out.println(a = +a); System.out.println(b = +b); } System.out.println(a
-
System.out.print(finally);}}??? ?public static void main(String []?args) ?{try{aMethod(0);??? }catch
-
Test(); test.start(); try{ test.sleep(3000); }catch( Exception e ){ } System.out.println(“main线程”