题目
getCustomerInfo()方法如下,try中可以捕获三种类型的异常,如果在该方法运行中产生了一个IOException,将会输出什么结果()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <p>public void getCustomerInfo() {</p> try { // do something that may cause an Exception } catch (java.io.FileNotFoundException ex) { System.out.print( "FileNotFoundException!" ); } catch (java.io.IOException ex) { System.out.print( "IOException!" ); } catch (java.lang.Exception ex) { System.out.print( "Exception!" ); } } |
A.IOException!
B.IOException!Exception!
C.FileNotFoundException!IOException!
D.FileNotFoundException!IOException!Exception!
整个看下来还是感觉迷迷糊糊的