给定以下JAVA代码,这段代码编译运行后输出的结果是( ?)。???public class Test {???????public static int aMethod(int i) throws Exception ???{??? ?try{return i/10;}catch(Exception ex){throw new Exception (exception in a aMothod);}finally{?? ? System.out.print(finally);}}??? ?public static void main(String []?args) ?{try{aMethod(0);??? }catch(Exception ex){System.out.print(exception in main);??? }System.out.print(finished);}}
Afinally?out?exception in mainfinished
Bexception in mainfinally
Cfinally finished
Dfinally exception in mainfinished
相关试题
-
给定以下JAVA代码,这段代码编译运行后输出的结果是( ?)。???public class Test {???????public static int aMethod(int i) throws
-
在Java中,执行以下代码后,说法正确的是 public class Test extends Thread { public static void main(String args[]) { T
-
下列代码的编译或执行结果是: public class MyVal { public static void main(String[] args) { MyVal m
-
Exception); }finally { System.out.println(Finally); } } 如果sayHello( )方法正常运行,则test( )方法的
-
下列代码的执行结果是 public class Test { public int aMethod() { static int i=0; i++; System.out.print