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
答案解析:有
微信扫一扫手机做题