试题详情
单项选择题 现有:   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
  • 关注下方微信公众号,在线模考后查看

热门试题