<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                >[success] # 數組的賦值操作 ~~~ public class ArrayTest { public static void main(String[] args) { int[] iLs = { 1, 8, 9, 0, 10 }; iLs[1] = 66; System.out.println(iLs[1]); // 66 } } ~~~ >[success] # 插入操作 * 插入操作就是需要將數據`后移`空出位置在`插入`回去 ~~~ // 將10插入數組第一項 public class ArrayTest { public static void main(String[] args) { int[] iLs = new int[5]; // 此時iLs[0]的值為[0,1,2,3,0] for (int i = 0; i < iLs.length - 1; i++) { iLs[i] = i; } // 將10插入數組第一項 得到數組結構為[10,0,1,2,3] // 需要先將每一項后移動一位 for (int i = iLs.length - 1; i > 0; i--) { iLs[i] = iLs[i - 1]; } // 將10 插入到第一位 iLs[0] = 10; } } ~~~ >[success] # 刪除操作 * 刪除操作就是需要將數據向`前` 移動,依次覆蓋 ~~~ // 刪除數組第二項 public class ArrayTest { public static void main(String[] args) { int[] iLs = new int[5]; // 此時iLs[0]的值為[0,1,2,3,0] for (int i = 0; i < iLs.length - 1; i++) { iLs[i] = i; } // 刪除數組第二項 [0,2,3,0,0] // 需要先將每一項前移動一位 for (int i = 1; i < iLs.length - 1; i++) { iLs[i] = iLs[i + 1]; } // 將最后一位歸0 iLs[iLs.length - 1] = 0; } } ~~~ >[success] # 查找 ~~~ // 找到值是7的下角標 public class ArrayTest { public static void main(String[] args) { int[] iLs = { 5, 4, 6, 7, 10 }; for (int i = 0; i < iLs.length; i++) { if (iLs[i] == 7) { System.out.print(i); } } } } ~~~
                  <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>

                              哎呀哎呀视频在线观看