• 2022-05-28
    阅读下面的代码段,屏幕的输出是什么?public static void main(String[] args) { try{tryThis();return;}catch(IOException x1){ System.out.println("exception 1");return;}catch(Exception x2){System.out.println("exception 2");return;}finally{ System.out.println("finally");} } static void tryThis() throws IOException{ throw new IOException(); }
    A: ”exception1”后面跟着”finally”
    B: ” exception2”后面跟着“finally”
    C: ”exception1”
    D: ”exception2”
  • 举一反三