{"id":1549,"date":"2023-06-27T13:54:14","date_gmt":"2023-06-27T05:54:14","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=1549"},"modified":"2023-06-27T13:54:14","modified_gmt":"2023-06-27T05:54:14","slug":"java%e5%a6%82%e4%bd%95%e8%87%aa%e5%ae%9a%e4%b9%89%e4%b8%80%e4%b8%aa%e5%8f%98%e9%95%bf%e6%95%b0%e7%bb%84%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/%e7%ae%97%e6%b3%95\/java%e5%a6%82%e4%bd%95%e8%87%aa%e5%ae%9a%e4%b9%89%e4%b8%80%e4%b8%aa%e5%8f%98%e9%95%bf%e6%95%b0%e7%bb%84%ef%bc%9f\/","title":{"rendered":"Java\u5982\u4f55\u81ea\u5b9a\u4e49\u4e00\u4e2a\u53d8\u957f\u6570\u7ec4\uff1f"},"content":{"rendered":"<div class='wxsyncmain'>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">\u9996\u5148\u9700\u8981\u58f0\u660e\u7684\u662f\uff0c<strong>Java<\/strong>\u672c\u8eab\u662f\u63d0\u4f9b\u4e86\u53d8\u957f\u6570\u7ec4\u7684\uff0c\u5373<\/span><strong><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">Array<\/span><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">List<\/span><\/strong><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">\u3002\u90a3\u4e48\u81ea\u5b9a\u4e49\u4e00\u4e2a\u53d8\u957f\u6570\u7ec4\u6709\u5565\u7528\uff1f\u5176\u5b9e\u6ca1\u5565\u7528\u6216\u8005\u8bf4\u7528\u5904\u4e0d\u5927\uff0c\u8fd9\u91cc\u4e3b\u8981\u5c31\u662f\u4e3a\u4e86\u4e86\u89e3\u4e0b\u53d8\u957f\u6570\u7ec4\u7684\u8bbe\u8ba1\u7406\u5ff5\u800c\u5df2\u3002\u5b9e\u9645\u5de5\u4f5c\u4e2d\u76f4\u63a5\u4f7f\u7528<strong>ArrayList<\/strong>\u3002<\/span><\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 8px;outline: 0px;font-weight: bold;font-size: 1.3em;max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);text-size-adjust: inherit;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;border-bottom: 2px solid rgb(239, 112, 96);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"margin-right: 3px;padding: 3px 10px 1px;outline: 0px;max-width: 100%;display: inline-block;background-color: rgb(239, 112, 96);color: rgb(255, 255, 255);border-top-right-radius: 3px;border-top-left-radius: 3px;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">\u601d\u8def\u5206\u6790<\/span><span style=\"outline: 0px;max-width: 100%;display: inline-block;vertical-align: bottom;border-bottom: 36px solid rgb(239, 235, 233);border-right: 20px solid transparent;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><\/span><\/h2>\n<p style=\"margin-top: 24px;margin-bottom: 8px;outline: 0px;max-width: 100%;box-sizing: border-box;letter-spacing: 0.544px;white-space: normal;font-weight: 600;font-size: 20px;text-size-adjust: inherit;font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, SimHei, Arial, SimSun;color: rgb(79, 79, 79);line-height: 28px;font-variant-ligatures: no-common-ligatures;text-align: start;background-color: rgb(255, 255, 255);visibility: visible;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;font-size: 17px;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">\u4e3b\u8981\u529f\u80fd\u70b9<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">1. \u65b0\u5efa\u65f6\u53ef\u4ee5\u6307\u5b9a\u5bb9\u91cf\u5927\u5c0f\uff0c\u4e0d\u6307\u5b9a\u65f6\u4f7f\u7528\u9ed8\u8ba4\u5bb9\u91cf\u5927\u5c0f\u3002<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">2. \u5411\u6570\u7ec4\u4e2d\u8ffd\u52a0\u65b0\u5143\u7d20\uff0c\u5f53\u8d85\u8fc7\u5bb9\u91cf\u65f6\u5e94\u8be5\u81ea\u52a8\u6269\u5bb9\u3002<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">3. \u5411\u6570\u7ec4\u4e2d\u6307\u5b9a\u4f4d\u7f6e\u6dfb\u52a0\u65b0\u5143\u7d20\uff0c\u9700\u8981\u8003\u8651\u6307\u5b9a\u7684\u4e0b\u6807\u662f\u5426\u8d8a\u754c\uff0c\u540c\u6837\u4e5f\u9700\u8981\u8003\u8651\u6269\u5bb9\u64cd\u4f5c\u3002<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">4. \u5220\u9664\u672b\u5c3e\u7684\u5143\u7d20\uff0c\u9700\u8981\u8003\u8651\u7f29\u5c0f\u5bb9\u91cf\u3002<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">5. \u5220\u9664\u6307\u5b9a\u4f4d\u7f6e\u5143\u7d20\uff0c\u9700\u8981\u8003\u8651\u6307\u5b9a\u7684\u4e0b\u6807\u662f\u5426\u8d8a\u754c\uff0c\u540c\u6837\u4e5f\u9700\u8981\u8003\u8651\u7f29\u5c0f\u5bb9\u91cf\u3002<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">6. \u4fee\u6539\u7279\u5b9a\u4f4d\u7f6e\u7684\u5143\u7d20\uff0c\u9700\u8981\u8003\u8651\u6307\u5b9a\u7684\u4e0b\u6807\u662f\u5426\u8d8a\u754c\u3002<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">7. \u4ee5\u65f6\u95f4\u590d\u6742\u5ea6\u4e3a<\/span><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;font-size: 17px;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><em>O(1)<\/em><\/span><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">\u83b7\u53d6\u4efb\u610f\u4f4d\u7f6e\u7684\u5143\u7d20\uff0c\u9700\u8981\u8003\u8651\u6307\u5b9a\u7684\u4e0b\u6807\u662f\u5426\u8d8a\u754c\u3002<\/span><\/p>\n<section style=\"margin-bottom: 0px;\"><br  \/><\/section>\n<section style=\"margin-bottom: 8px;outline: 0px;max-width: 100%;box-sizing: border-box;letter-spacing: 0.544px;white-space: normal;font-weight: 600;font-size: 20px;text-size-adjust: inherit;font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, SimHei, Arial, SimSun;color: rgb(79, 79, 79);line-height: 28px;font-variant-ligatures: no-common-ligatures;text-align: start;background-color: rgb(255, 255, 255);visibility: visible;margin-top: 0px;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;font-size: 17px;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">\u4e3b\u8981\u6ce8\u610f\u70b9<\/span><\/section>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">1. <strong>\u6269\u5bb9\uff1a<\/strong>\u8fd9\u91cc\u6269\u5bb9 <strong>2<\/strong> \u500d\uff08<strong>ArrayList<\/strong> \u662f\u6269\u5bb9 <strong>1.5<\/strong>&nbsp;\u500d\uff09\uff0c\u6269\u5bb9\u65f6\u65b0\u5efa\u4e00\u4e2a <strong>2<\/strong> \u500d\u5bb9\u91cf\u7684\u65b0\u6570\u7ec4\uff0c\u7136\u540e\u5c06\u65e7\u6570\u7ec4\u4e2d\u7684\u5143\u7d20\u6309\u987a\u5e8f\u62f7\u8d1d\u5230\u65b0\u6570\u7ec4\u3002<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">2. <strong>\u7f29\u5bb9\uff1a<\/strong>\u5f53\u6570\u7ec4\u4e2d\u7684\u5143\u7d20\u4e2a\u6570 <strong>&lt;= 0.25 * \u5bb9\u91cf<\/strong>\u65f6\uff0c\u81ea\u52a8\u7f29\u5c0f\u5bb9\u91cf\u4e3a\u539f\u6765\u7684\u4e00\u534a\uff0c\u65b0\u5efa\u4e00\u4e2a\u5bb9\u91cf\u662f\u539f\u6765\u5bb9\u91cf\u4e00\u534a\u7684\u6570\u7ec4\uff0c\u7136\u540e\u5c06\u65e7\u6570\u7ec4\u4e2d\u7684\u5143\u7d20\u6309\u987a\u5e8f\u62f7\u8d1d\u5230\u65b0\u6570\u7ec4\u3002\uff08<strong>ArrayList<\/strong> \u7f29\u5c0f\u4e3a\u548c\u5f53\u524d\u5143\u7d20\u4e2a\u6570\u4e00\u6837\u5927\uff09\u3002<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">3. <strong>\u6307\u5b9a\u4f4d\u7f6e\u6dfb\u52a0\uff1a<\/strong>\u9700\u8981\u5148\u5c06\u6307\u5b9a\u4f4d\u7f6e\u53ca\u540e\u9762\u6240\u6709\u7684\u5143\u7d20\u90fd\u5411\u540e\u79fb\u52a8\u4e00\u4f4d\uff0c\u5c06\u6307\u5b9a\u4f4d\u7f6e\u7a7a\u51fa\u6765\u7136\u540e\u518d\u63d2\u5165\u3002<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"background-color: rgb(255, 255, 255);\">4. <\/span><strong style=\"background-color: rgb(255, 255, 255);\">\u6307\u5b9a\u4f4d\u7f6e\u5220\u9664\uff1a<\/strong><span style=\"background-color: rgb(255, 255, 255);\">\u5148\u5c06<\/span>\u6307<span style=\"background-color: rgb(255, 255, 255);\">\u5b9a\u4f4d\u7f6e\u5220\u9664\uff0c\u7136\u540e\u5c06\u540e\u9762\u7684\u6240\u6709\u5143\u7d20\u90fd\u5411\u524d\u79fb\u52a8\u4e00\u4f4d\u3002<\/span><\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">5. <strong>\u5bb9\u91cf\u5927\u5c0f\uff1a<\/strong>\u9700\u8981\u6307\u5b9a\u5bb9\u91cf\u7684\u6700\u5927\u503c\uff0c\u907f\u514d <strong>OOM <\/strong>\u7684\u53d1\u751f\u3002\u6700\u5c0f\u503c\u53ef\u4ee5\u6307\u5b9a\u4e5f\u53ef\u4ee5\u4e0d\u6307\u5b9a\u3002<\/span><\/p>\n<p><br  \/><\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 8px;font-weight: bold;font-size: 1.3em;white-space: normal;outline: 0px;max-width: 100%;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);text-size-adjust: inherit;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;text-align: left;border-bottom: 2px solid rgb(239, 112, 96);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"margin-right: 3px;padding: 3px 10px 1px;outline: 0px;max-width: 100%;display: inline-block;background-color: rgb(239, 112, 96);color: rgb(255, 255, 255);border-top-right-radius: 3px;border-top-left-radius: 3px;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">\u4ee3\u7801\u5b9e\u73b0<\/span><\/h2>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"cpp\"><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\">\/**<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\"> * \u53d8\u957f\u6570\u7ec4<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\"> * *\/<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__keyword\">public<\/span>&nbsp;<span class=\"code-snippet__class\"><span class=\"code-snippet__keyword\">class<\/span>&nbsp;<span class=\"code-snippet__title\">ResizeableArray<\/span>&lt;E&gt;&nbsp;{<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"code-snippet__keyword\">private<\/span>&nbsp;<span class=\"code-snippet__keyword\">static<\/span>&nbsp;final&nbsp;<span class=\"code-snippet__keyword\">int<\/span>&nbsp;MIN_CAPACITY&nbsp;=&nbsp;<span class=\"code-snippet__number\">10<\/span>;<\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"code-snippet__keyword\">private<\/span>&nbsp;<span class=\"code-snippet__keyword\">static<\/span>&nbsp;final&nbsp;<span class=\"code-snippet__keyword\">int<\/span>&nbsp;MAX_CAPACITY&nbsp;=&nbsp;Integer.MAX_VALUE&nbsp;-&nbsp;<span class=\"code-snippet__number\">8<\/span>;<\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__comment\">\/\/ \u5f53\u524d\u5b9e\u9645\u6570\u636e\u5927\u5c0f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"code-snippet__keyword\">private<\/span>&nbsp;<span class=\"code-snippet__keyword\">int<\/span>&nbsp;size&nbsp;=&nbsp;<span class=\"code-snippet__number\">0<\/span>;<\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__comment\">\/\/ \u5b9e\u9645\u5b58\u653e\u5143\u7d20\u7684\u6570\u7ec4\uff0c\u5bb9\u91cf\u4e3a elements.length<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"code-snippet__keyword\">private<\/span>&nbsp;Object[]&nbsp;elements;<\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__function\"><span class=\"code-snippet__keyword\">public<\/span> <span class=\"code-snippet__title\">ResizeableArray<\/span><span class=\"code-snippet__params\">()<\/span><\/span>{<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">this<\/span>(MIN_CAPACITY);<\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__function\"><span class=\"code-snippet__keyword\">public<\/span> <span class=\"code-snippet__title\">ResizeableArray<\/span><span class=\"code-snippet__params\">(<span class=\"code-snippet__keyword\">int<\/span> initCapacity)<\/span><\/span>{<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">if<\/span>(initCapacity &lt; MIN_CAPACITY){<\/span><\/code><code><span class=\"code-snippet_outer\">            initCapacity = MIN_CAPACITY;<\/span><\/code><code><span class=\"code-snippet_outer\">        }<span class=\"code-snippet__keyword\">else<\/span> <span class=\"code-snippet__keyword\">if<\/span>(initCapacity &gt; MAX_CAPACITY){<\/span><\/code><code><span class=\"code-snippet_outer\">            initCapacity = MAX_CAPACITY;<\/span><\/code><code><span class=\"code-snippet_outer\">        }<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">this<\/span>.elements = <span class=\"code-snippet__keyword\">new<\/span> Object[initCapacity];<\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;<\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__comment\">\/\/ \u6570\u7ec4\u7684\u7279\u6027\uff0c\u6839\u636e\u4e0b\u6807\u83b7\u53d6\u5143\u7d20<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__function\"><span class=\"code-snippet__keyword\">public<\/span> E <span class=\"code-snippet__title\">get<\/span><span class=\"code-snippet__params\">(<span class=\"code-snippet__keyword\">int<\/span> index)<\/span><\/span>{<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">this<\/span>.checkIndex(index);<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">return<\/span> (E)elements[index];<\/span><\/code><code><span class=\"code-snippet_outer\">    }<\/span><\/code><code><span class=\"code-snippet_outer\">    <\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__comment\">\/\/ \u6dfb\u52a0\u4e00\u4e2a\u5143\u7d20\u5230\u6700\u540e<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__function\"><span class=\"code-snippet__keyword\">public<\/span> <span class=\"code-snippet__keyword\">void<\/span> <span class=\"code-snippet__title\">add<\/span><span class=\"code-snippet__params\">(E element)<\/span><\/span>{<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">if<\/span>(size == elements.length){<\/span><\/code><code><span class=\"code-snippet_outer\">            <span class=\"code-snippet__comment\">\/\/ \u9700\u8981\u6269\u5bb9<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">            <span class=\"code-snippet__keyword\">this<\/span>.expandCapacity();<\/span><\/code><code><span class=\"code-snippet_outer\">        }<\/span><\/code><code><span class=\"code-snippet_outer\">        elements[size++] = element;<\/span><\/code><code><span class=\"code-snippet_outer\">    }<\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__comment\">\/\/ \u6dfb\u52a0\u4e00\u4e2a\u5143\u7d20\u5230\u6307\u5b9a\u4f4d\u7f6e<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"code-snippet__function\"><span class=\"code-snippet__keyword\">public<\/span>&nbsp;<span class=\"code-snippet__keyword\">void<\/span>&nbsp;<span class=\"code-snippet__title\">add<\/span><span class=\"code-snippet__params\">(<span class=\"code-snippet__keyword\">int<\/span>&nbsp;index,&nbsp;E&nbsp;element)<\/span><\/span>{<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">if<\/span>(index == size){<\/span><\/code><code><span class=\"code-snippet_outer\">            <span class=\"code-snippet__keyword\">this<\/span>.add(element);<\/span><\/code><code><span class=\"code-snippet_outer\">            <span class=\"code-snippet__keyword\">return<\/span>;<\/span><\/code><code><span class=\"code-snippet_outer\">        }<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">this<\/span>.checkIndex(index);<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">if<\/span>(size == elements.length){<\/span><\/code><code><span class=\"code-snippet_outer\">            <span class=\"code-snippet__comment\">\/\/ \u9700\u8981\u6269\u5bb9<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">            <span class=\"code-snippet__keyword\">this<\/span>.expandCapacity();<\/span><\/code><code><span class=\"code-snippet_outer\">        }<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__comment\">\/\/ \u9700\u8981\u5148\u5c06index\u548c\u4e4b\u540e\u7684\u6240\u6709\u5143\u7d20\u5411\u540e\u79fb\u52a8\u4e00\u4f4d<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">for<\/span>(<span class=\"code-snippet__keyword\">int<\/span> i = size - <span class=\"code-snippet__number\">1<\/span>; i &gt;= index; i--){<\/span><\/code><code><span class=\"code-snippet_outer\">            elements[i + <span class=\"code-snippet__number\">1<\/span>] = elements[i];<\/span><\/code><code><span class=\"code-snippet_outer\">        }<\/span><\/code><code><span class=\"code-snippet_outer\">        elements[index] = element;<\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;size++;<\/span><\/code><code><span class=\"code-snippet_outer\">    }<\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__comment\">\/\/ \u8bbe\u7f6e\u4e0b\u6807\u4e3aindex\u7684\u5143\u7d20<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__function\"><span class=\"code-snippet__keyword\">private<\/span> <span class=\"code-snippet__keyword\">void<\/span> <span class=\"code-snippet__title\">set<\/span><span class=\"code-snippet__params\">(<span class=\"code-snippet__keyword\">int<\/span> index, E element)<\/span><\/span>{<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">this<\/span>.checkIndex(index);<\/span><\/code><code><span class=\"code-snippet_outer\">        elements[index] = element;<\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__comment\">\/**<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\">     * \u5220\u9664\u4e0b\u6807\u4e3aindex\u7684\u5143\u7d20<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\">     * \u5f53 size &lt;= 0.25 * capacity \u7684\u65f6\u5019\u7f29\u5c0f\u5bb9\u91cf<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\/<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__function\"><span class=\"code-snippet__keyword\">private<\/span> <span class=\"code-snippet__keyword\">void<\/span> <span class=\"code-snippet__title\">delete<\/span><span class=\"code-snippet__params\">(<span class=\"code-snippet__keyword\">int<\/span> index)<\/span><\/span>{<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">this<\/span>.checkIndex(index);<\/span><\/code><code><span class=\"code-snippet_outer\">        elements[index] = null;<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__comment\">\/\/ \u5982\u679c\u5220\u9664\u7684\u4e0d\u662f\u6700\u540e\u4e00\u4e2a\u5143\u7d20\uff0c\u9700\u8981\u5c06\u540e\u7eed\u5143\u7d20\u5f80\u524d\u79fb\u52a8\u4e00\u4f4d<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">if<\/span>(index &lt; size - <span class=\"code-snippet__number\">1<\/span>){<\/span><\/code><code><span class=\"code-snippet_outer\">            <span class=\"code-snippet__keyword\">for<\/span>(<span class=\"code-snippet__keyword\">int<\/span> i = index + <span class=\"code-snippet__number\">1<\/span>; i &lt; size; i++){<\/span><\/code><code><span class=\"code-snippet_outer\">                elements[i - <span class=\"code-snippet__number\">1<\/span>] = elements[i];<\/span><\/code><code><span class=\"code-snippet_outer\">            }<\/span><\/code><code><span class=\"code-snippet_outer\">        }<\/span><\/code><code><span class=\"code-snippet_outer\">        size--;<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">if<\/span>(size &lt;= <span class=\"code-snippet__number\">0.25<\/span> * elements.length){<\/span><\/code><code><span class=\"code-snippet_outer\">            <span class=\"code-snippet__keyword\">this<\/span>.reduceCapacity();<\/span><\/code><code><span class=\"code-snippet_outer\">        }<\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__function\"><span class=\"code-snippet__keyword\">private<\/span> <span class=\"code-snippet__keyword\">void<\/span> <span class=\"code-snippet__title\">deleteLast<\/span><span class=\"code-snippet__params\">()<\/span><\/span>{<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">this<\/span>.<span class=\"code-snippet__keyword\">delete<\/span>(size - <span class=\"code-snippet__number\">1<\/span>);<\/span><\/code><code><span class=\"code-snippet_outer\">    }<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__function\"><span class=\"code-snippet__keyword\">private<\/span> <span class=\"code-snippet__keyword\">void<\/span> <span class=\"code-snippet__title\">checkIndex<\/span><span class=\"code-snippet__params\">(<span class=\"code-snippet__keyword\">int<\/span> index)<\/span><\/span>{<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">if<\/span>(index &lt; <span class=\"code-snippet__number\">0<\/span> || index &gt;= size){<\/span><\/code><code><span class=\"code-snippet_outer\">            <span class=\"code-snippet__keyword\">throw<\/span> <span class=\"code-snippet__keyword\">new<\/span> IndexOutOfBoundsException(String.format(<span class=\"code-snippet__string\">\"Out of bounds at: %s, size is: %d\"<\/span>, index, size));<\/span><\/code><code><span class=\"code-snippet_outer\">        }<\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__function\"><span class=\"code-snippet__keyword\">private<\/span> <span class=\"code-snippet__keyword\">void<\/span> <span class=\"code-snippet__title\">expandCapacity<\/span><span class=\"code-snippet__params\">()<\/span><\/span>{<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">if<\/span>(MAX_CAPACITY == elements.length){<\/span><\/code><code><span class=\"code-snippet_outer\">            <span class=\"code-snippet__comment\">\/\/ \u5bb9\u91cf\u8fbe\u5230\u6700\u5927\u9650\u5236\uff0c\u65e0\u6cd5\u6269\u5bb9\u3002<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">            <span class=\"code-snippet__keyword\">throw<\/span> <span class=\"code-snippet__keyword\">new<\/span> RuntimeException(<span class=\"code-snippet__string\">\"The capacity has reached its maximum limit and cannot be expanded.\"<\/span>);<\/span><\/code><code><span class=\"code-snippet_outer\">        }<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">int<\/span> newCapacity = Math.min(elements.length &lt;&lt; <span class=\"code-snippet__number\">1<\/span>, MAX_CAPACITY);<\/span><\/code><code><span class=\"code-snippet_outer\">        Object[] newElements = <span class=\"code-snippet__keyword\">new<\/span> Object[newCapacity];<\/span><\/code><code><span class=\"code-snippet_outer\">        System.arraycopy(elements, <span class=\"code-snippet__number\">0<\/span>, newElements, <span class=\"code-snippet__number\">0<\/span>, size);<\/span><\/code><code><span class=\"code-snippet_outer\">        elements = newElements;<\/span><\/code><code><span class=\"code-snippet_outer\">    }<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__function\"><span class=\"code-snippet__keyword\">private<\/span> <span class=\"code-snippet__keyword\">void<\/span> <span class=\"code-snippet__title\">reduceCapacity<\/span><span class=\"code-snippet__params\">()<\/span><\/span>{<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">if<\/span>(elements.length == MIN_CAPACITY){<\/span><\/code><code><span class=\"code-snippet_outer\">            <span class=\"code-snippet__keyword\">return<\/span>;<\/span><\/code><code><span class=\"code-snippet_outer\">        }<\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">int<\/span> newCapacity = Math.max(elements.length &gt;&gt; <span class=\"code-snippet__number\">1<\/span>, MIN_CAPACITY);<\/span><\/code><code><span class=\"code-snippet_outer\">        Object[] newElements = <span class=\"code-snippet__keyword\">new<\/span> Object[newCapacity];<\/span><\/code><code><span class=\"code-snippet_outer\">        System.arraycopy(elements, <span class=\"code-snippet__number\">0<\/span>, newElements, <span class=\"code-snippet__number\">0<\/span>, size);<\/span><\/code><code><span class=\"code-snippet_outer\">        elements = newElements;<\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">    <span class=\"code-snippet__function\"><span class=\"code-snippet__keyword\">public<\/span> <span class=\"code-snippet__keyword\">static<\/span> <span class=\"code-snippet__keyword\">void<\/span> <span class=\"code-snippet__title\">main<\/span><span class=\"code-snippet__params\">(String[] args)<\/span><\/span>{<\/span><\/code><code><span class=\"code-snippet_outer\">        ResizeableArray&lt;Integer&gt; resizeableArray = <span class=\"code-snippet__keyword\">new<\/span> ResizeableArray&lt;&gt;();<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u521d\u59cb\u5316\u540e\uff0csize\u4e3a: %d n\"<\/span>, resizeableArray.size);<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u521d\u59cb\u5316\u540e\uff0ccapacity\u4e3a: %d n\"<\/span>, resizeableArray.elements.length);<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.println();<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">for<\/span>(<span class=\"code-snippet__keyword\">int<\/span> i = <span class=\"code-snippet__number\">0<\/span>; i &lt; <span class=\"code-snippet__number\">20<\/span>; i++){<\/span><\/code><code><span class=\"code-snippet_outer\">            resizeableArray.add(i);<\/span><\/code><code><span class=\"code-snippet_outer\">        }<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u6dfb\u52a020\u4e2a\u5143\u7d20\u540e\uff0csize\u4e3a: %d n\"<\/span>, resizeableArray.size);<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u6dfb\u52a020\u4e2a\u5143\u7d20\u540e\uff0ccapacity\u4e3a: %d n\"<\/span>, resizeableArray.elements.length);<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u6dfb\u52a020\u4e2a\u5143\u7d20\u540e\uff0c\u7b2c5\u4e2a\u5143\u7d20\u662f: %d n\"<\/span>, resizeableArray.get(<span class=\"code-snippet__number\">4<\/span>));<\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println();<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resizeableArray.<span class=\"code-snippet__keyword\">delete<\/span>(<span class=\"code-snippet__number\">4<\/span>);<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u5220\u9664\u7b2c\u4e94\u4e2a\u5143\u7d20\u540e\uff0csize\u4e3a: %d n\"<\/span>, resizeableArray.size);<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u5220\u9664\u7b2c\u4e94\u4e2a\u5143\u7d20\u540e\uff0ccapacity\u4e3a: %d n\"<\/span>, resizeableArray.elements.length);<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u5220\u9664\u7b2c\u4e94\u4e2a\u5143\u7d20\u540e\uff0c\u7b2c5\u4e2a\u5143\u7d20\u662f: %dn\"<\/span>, resizeableArray.get(<span class=\"code-snippet__number\">4<\/span>));<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.println();<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">        resizeableArray.add(<span class=\"code-snippet__number\">4<\/span>, <span class=\"code-snippet__number\">100<\/span>);<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u5728\u7b2c\u4e94\u4e2a\u4f4d\u7f6e\u63d2\u5165\u5143\u7d20\u540e\uff0csize\u4e3a: %d n\"<\/span>, resizeableArray.size);<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u5728\u7b2c\u4e94\u4e2a\u4f4d\u7f6e\u63d2\u5165\u5143\u7d20\u540e\uff0ccapacity\u4e3a: %d n\"<\/span>, resizeableArray.elements.length);<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u5728\u7b2c\u4e94\u4e2a\u4f4d\u7f6e\u63d2\u5165\u5143\u7d20\u540e\uff0c\u7b2c5\u4e2a\u5143\u7d20\u662f: %dn\"<\/span>, resizeableArray.get(<span class=\"code-snippet__number\">4<\/span>));<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.println();<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">        <span class=\"code-snippet__keyword\">for<\/span>(<span class=\"code-snippet__keyword\">int<\/span> i = <span class=\"code-snippet__number\">0<\/span>; i &lt; <span class=\"code-snippet__number\">15<\/span>; i++){<\/span><\/code><code><span class=\"code-snippet_outer\">            resizeableArray.deleteLast();<\/span><\/code><code><span class=\"code-snippet_outer\">        }<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u5220\u9664\u540e\u976215\u4e2a\u5143\u7d20\u540e\uff0csize\u4e3a: %d n\"<\/span>, resizeableArray.size);<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u5220\u9664\u540e\u976215\u4e2a\u5143\u7d20\u540e\uff0ccapacity\u4e3a: %d n\"<\/span>, resizeableArray.elements.length);<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u5220\u9664\u540e\u976215\u4e2a\u5143\u7d20\u540e\uff0c\u7b2c5\u4e2a\u5143\u7d20\u662f: %dn\"<\/span>, resizeableArray.get(<span class=\"code-snippet__number\">4<\/span>));<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.println();<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">        resizeableArray.<span class=\"code-snippet__built_in\">set<\/span>(<span class=\"code-snippet__number\">4<\/span>, <span class=\"code-snippet__number\">200<\/span>);<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u4fee\u6539\u7b2c\u4e94\u4e2a\u5143\u7d20\u540e\uff0c\u5f53\u524dsize\u4e3a: %d n\"<\/span>, resizeableArray.size);<\/span><\/code><code><span class=\"code-snippet_outer\">        System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u4fee\u6539\u7b2c\u4e94\u4e2a\u5143\u7d20\u540e\uff0ccapacity\u4e3a: %d n\"<\/span>, resizeableArray.elements.length);<\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.<span class=\"code-snippet__built_in\">printf<\/span>(<span class=\"code-snippet__string\">\"\u4fee\u6539\u7b2c\u4e94\u4e2a\u5143\u7d20\u540e\uff0c\u7b2c5\u4e2a\u5143\u7d20\u662f:&nbsp;%dn\"<\/span>,&nbsp;resizeableArray.get(<span class=\"code-snippet__number\">4<\/span>));<\/span><\/code><code><span class=\"code-snippet_outer\">&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><\/code><code><span class=\"code-snippet_outer\">}<\/span><\/code><\/pre>\n<\/section>\n<section style=\"margin-bottom: 0px;\"><br  \/><\/section>\n<p style=\"margin-bottom: 8px;outline: 0px;max-width: 100%;box-sizing: border-box;letter-spacing: 0.544px;white-space: normal;font-weight: 600;font-size: 20px;text-size-adjust: inherit;font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, SimHei, Arial, SimSun;color: rgb(79, 79, 79);line-height: 28px;font-variant-ligatures: no-common-ligatures;text-align: start;background-color: rgb(255, 255, 255);visibility: visible;margin-top: 0px;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;font-size: 17px;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">\u6d4b\u8bd5\u7ed3\u679c<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">\u7531\u6267\u884c\u7ed3\u679c\u53ef\u77e5\uff1a<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">&nbsp;1. \u521d\u59cb\u5316\u540e\u9ed8\u8ba4\u5bb9\u91cf\u4e3a <strong>10<\/strong>\u3002<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">&nbsp;2. \u6dfb\u52a0\u5143\u7d20\u8d85\u8fc7 <strong>10<\/strong> \u4e2a\u540e\u4f1a\u81ea\u52a8\u6269\u5bb9\u3002<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">&nbsp;3. \u5220\u9664\u4e00\u4e2a\u5143\u7d20\u540e\uff0c<strong>size<\/strong> \u4f1a\u51cf <strong>1<\/strong>\uff0c\u540e\u9762\u5143\u7d20\u4f1a\u81ea\u52a8\u5411\u524d\u79fb\u52a8\u4e00\u4f4d\u3002<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">&nbsp;4. \u63d2\u5165\u4e00\u4e2a\u65b0\u5143\u7d20\u540e\uff0c<strong>size&nbsp;<\/strong>\u4f1a\u52a0 <strong>1<\/strong>\uff0c\u540e\u7eed\u5143\u7d20\u540e\u79fb\u4e00\u4f4d\u3002<\/span><\/p>\n<p style=\"margin-bottom: 0px;outline: 0px;max-width: 100%;color: rgb(34, 34, 34);font-family: system-ui, -apple-system, &quot;system-ui&quot;, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\"><span style=\"outline: 0px;max-width: 100%;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;font-size: 16px;letter-spacing: 0.544px;text-align: left;caret-color: rgb(0, 0, 0);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;\">&nbsp;5. \u5220\u9664\u5230\u53ea\u6709 <strong>0.25 * \u5bb9\u91cf<\/strong> \u4e2a\u5143\u7d20\u540e\uff0c\u4f1a\u81ea\u52a8\u7f29\u5c0f\u5bb9\u91cf\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 i\u4f59\u6570              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148\u9700\u8981\u58f0\u660e\u7684\u662f\uff0cJava\u672c\u8eab\u662f\u63d0\u4f9b\u4e86\u53d8\u957f\u6570\u7ec4\u7684\uff0c\u5373ArrayList\u3002\u90a3\u4e48\u81ea\u5b9a\u4e49\u4e00\u4e2a\u53d8\u957f\u6570\u7ec4\u6709\u5565\u7528\uff1f\u5176\u5b9e\u6ca1\u5565\u7528\u6216\u8005\u8bf4\u7528\u5904\u4e0d\u5927\uff0c\u8fd9 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":1548,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[22],"tags":[],"class_list":["post-1549","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-22"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043629604-150x150.jpeg","content_first_image":null,"post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043629604-300x128.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043629604-1024x435.jpeg","post_frist_image":null,"post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043629604-300x128.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043629604-1024x435.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043629604.jpeg","post_all_images":[],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"\u7b97\u6cd5","post_date":"2023-06-27","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":250,"next_post_id":2484,"next_post_title":"Java\u4e2d\u5c06 int[] \u6570\u7ec4 \u8f6c\u6362\u4e3a List\uff08ArrayList\uff09","previous_post_id":1489,"previous_post_title":"\u3010\u7b97\u6cd5\u9898\u89e3\u301114. \u6709\u6548\u7684\u62ec\u53f7","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/1549","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1549"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/1549\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/1548"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}