单项选择题
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.运行时异常被抛出
点击查看答案&解析
相关考题
