对于下面一段代码的描述中,正确的是______。 public class ex36 { public static void run main(String[] args) throws Excep

admin2012-12-13  25

问题 对于下面一段代码的描述中,正确的是______。        public class ex36       {              public static void run main(String[]  args)  throws Excepion              {                    method();              }              static void method()  throws Exception                    try                    {                           System.out.println("test");                    }                    finally                    {                           System.out.println ("finally");                    }             }      }

选项 A、代码编译成功,输出“test”和“fmally”
B、代码编译成功,输出“test”
C、代码实现选项A中的功能,之后Java停止程序运行,抛出异常,但是不进行处理
D、代码不能编译

答案A

解析
转载请注明原文地址:https://kaotiyun.com/show/KW2p777K
0

最新回复(0)