现有: class Parser extends Utilis { public static void main (String [] args) { try { System. out.print (new Parser ( ) .getlnt ("42")} ; } catch (NumberFormatException n) { System.out .println ( "NFExc" ) ; } } int getlnt (String arg) throws NumberFormatException{ return Integer.parselnt (arg) ; } class Utils { int getlnt (String arg) { return 42; } } 结果为 :()
- A、 NFExc
- B、 42
- C、 42NFExc
- D、编译失败
正确答案:B
答案解析:有
微信扫一扫手机做题