试题详情
- 单项选择题 class Parser extends Utils { public static void main (String [] args) { try { System.out.print(new Parser().getInt("42")); } catch (NumberFormatException n) { System.out.println("NFExc "); } } int getInt(String arg) throws NumberFormatException { return Integer.parseInt(arg); } } class Utils { int getInt(String arg) { return 42; } } 结果为:()
A、42
B、NFExc
C、42NFExc
D、编译失败
- A
关注下方微信公众号,在线模考后查看
热门试题