现有: class Parser extends Utils { public static void main(String [] args) { System.out.print(new Parser().getInt("42")); } int getInt(String arg) { return Integer.parseInt(arg); } } class Utils { int getInt(String arg) throws Exception { return 42; } } 结果为()
- A、 42
- B、 编译失败。
- C、 无输出结果。
- D、 运行时异常被抛出。
正确答案:A
答案解析:有

微信扫一扫手机做题