<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # 異常選擇題 **題目一** 下面哪個不對 1. RuntimeException is the superclass of those exceptions that must be thrown during the normal operation of the JVM 1. A method is not required to declare in its throws clause any subclasses of RuntimeExeption that might be thrown during the execution of the method but not caught. 1. An RuntimeException is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. 1. NullPointerException is one kind of RuntimeException 答案是 3 RuntimeException an unchecked exception. It doesn't need to be explicitly declared or catched. **題目二** 特殊情況就是里面加 return 舉個例子去理解 ~~~ public int getNumber() { int a = 0; try { String s = "t"; ------------------------(1) a = Integer.parseInt(s);-----------(2) return a; } catch (NumberFormatException e) { a = 1;-----------------------------------(3) return a;-------------------------------(4) } finally { a = 2;-----------------------------------(5) } } ~~~ 1、程序中標記的代碼的執行順序?2、改程序的最后返回值(外部調用時)? 程序按順序從上到下執行到(2),字符"t"轉換成整數失敗,產生異常并被捕獲,于是對a賦值成1,并將此值作為此方法的返回值(可以這么認為,該方法有一個存放返回值的空間,此時將1放在此處).由于存在finally塊,在返回前將該方法的內部變量a修改成2.所以程序將按標記的順序執行,外部調用該方法時得到的結果是1 先執行try或catch里里面的代碼,然后再執行finally,再執行try或catch里面的return. **題目三** 寫出你最常見到的5個runtime exception ClassCastExceptionIllegalArgumentExceptionNullPointerExceptionIndexOutOfBoundsExceptionArrayIndexOutOfBoundsException **題目四**
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看