{"id":38219,"date":"2025-05-20T01:04:26","date_gmt":"2025-05-19T17:04:26","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/38219.html"},"modified":"2025-05-20T01:04:26","modified_gmt":"2025-05-19T17:04:26","slug":"java%e5%ad%a6%e4%b9%a0%e4%b9%8b%e6%95%b0%e6%8d%ae%e7%bb%93%e6%9e%84%ef%bc%9a%e5%9b%9b%e3%80%81%e6%a0%91%ef%bc%88%e4%bb%a3%e7%a0%81%e8%a1%a5%e5%85%85%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/38219.html","title":{"rendered":"java\u5b66\u4e60\u4e4b\u6570\u636e\u7ed3\u6784\uff1a\u56db\u3001\u6811\uff08\u4ee3\u7801\u8865\u5145\uff09"},"content":{"rendered":"<p>\u8fd9\u90e8\u5206\u4e3b\u8981\u662f\u7528\u4ee3\u7801\u5b9e\u73b0\u6709\u5e8f\u4e8c\u53c9\u6811\u3001\u6811\u904d\u5386\u3001\u5220\u9664\u8282\u70b9<\/p>\n<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"-toc\" style=\"margin-left:0px\">\n<p id=\"1.%E6%9E%84%E5%BB%BA%E6%9C%89%E5%BA%8F%E4%BA%8C%E5%8F%89%E6%A0%91-toc\" style=\"margin-left:0px\">1.\u6784\u5efa\u6709\u5e8f\u4e8c\u53c9\u6811<\/p>\n<p id=\"1.1%E5%8E%9F%E7%90%86-toc\" style=\"margin-left:40px\">1.1\u539f\u7406<\/p>\n<p id=\"%C2%A01.2%E6%8F%92%E5%85%A5%E5%AE%9E%E7%8E%B0-toc\" style=\"margin-left:40px\">\u00a01.2\u63d2\u5165\u5b9e\u73b0<\/p>\n<p id=\"2.%E5%B9%BF%E5%BA%A6%E4%BC%98%E5%85%88%E9%81%8D%E5%8E%86--%E9%98%9F%E5%88%97%E5%AE%9E%E7%8E%B0-toc\" style=\"margin-left:0px\">2.\u5e7f\u5ea6\u4f18\u5148\u904d\u5386&#8211;\u961f\u5217\u5b9e\u73b0<\/p>\n<p id=\"3.%E6%B7%B1%E5%BA%A6%E4%BC%98%E5%85%88%E9%81%8D%E5%8E%86--%E9%80%92%E5%BD%92%E5%AE%9E%E7%8E%B0-toc\" style=\"margin-left:0px\">3.\u6df1\u5ea6\u4f18\u5148\u904d\u5386&#8211;\u9012\u5f52\u5b9e\u73b0<\/p>\n<p id=\"3.1%E5%85%88%E5%BA%8F%E9%81%8D%E5%8E%86-toc\" style=\"margin-left:40px\">3.1\u5148\u5e8f\u904d\u5386<\/p>\n<p id=\"3.2%E4%B8%AD%E5%BA%8F%E9%81%8D%E5%8E%86-toc\" style=\"margin-left:40px\">3.2\u4e2d\u5e8f\u904d\u5386<\/p>\n<p id=\"3.3%E5%90%8E%E5%BA%8F%E9%81%8D%E5%8E%86-toc\" style=\"margin-left:40px\">3.3\u540e\u5e8f\u904d\u5386<\/p>\n<p id=\"4.%E5%88%A0%E9%99%A4-toc\" style=\"margin-left:0px\">4.\u5220\u9664<\/p>\n<p id=\"4.1%E5%88%A0%E9%99%A4%E5%8F%B6%E5%AD%90%E8%8A%82%E7%82%B9-toc\" style=\"margin-left:40px\">4.1\u5220\u9664\u53f6\u5b50\u8282\u70b9<\/p>\n<p id=\"4.2%E5%88%A0%E9%99%A4%E6%9C%89%E4%B8%80%E6%A3%B5%E5%AD%90%E6%A0%91%E7%9A%84%E8%8A%82%E7%82%B9-toc\" style=\"margin-left:40px\">4.2\u5220\u9664\u6709\u4e00\u68f5\u5b50\u6811\u7684\u8282\u70b9<\/p>\n<p id=\"4.3%E5%88%A0%E9%99%A4%E6%9C%89%E4%B8%A4%E6%A3%B5%E5%AD%90%E6%A0%91%E7%9A%84%E8%8A%82%E7%82%B9-toc\" style=\"margin-left:40px\">4.3\u5220\u9664\u6709\u4e24\u68f5\u5b50\u6811\u7684\u8282\u70b9<\/p>\n<p id=\"5.%E6%95%B4%E4%BD%93%E4%BB%A3%E7%A0%81-toc\" style=\"margin-left:0px\">5.\u6574\u4f53\u4ee3\u7801<\/p>\n<hr id=\"hr-toc\" \/>\n<h2 id=\"1.%E6%9E%84%E5%BB%BA%E6%9C%89%E5%BA%8F%E4%BA%8C%E5%8F%89%E6%A0%91\">1.\u6784\u5efa\u6709\u5e8f\u4e8c\u53c9\u6811<\/h2>\n<h3 id=\"1.1%E5%8E%9F%E7%90%86\">1.1\u539f\u7406<\/h3>\n<p>\u5de6\u8fb9\u8282\u70b9\u503c\u5c0f\u4e8e\u7236\u8282\u70b9&#xff0c;\u53f3\u8fb9\u8282\u70b9\u503c\u5927\u4e8e\u7236\u8282\u70b9&#xff0c;\u770b\u4e0b\u56fe<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"277\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250519170425-682b649935131.png\" width=\"487\" \/><\/p>\n<h3 id=\"%C2%A01.2%E6%8F%92%E5%85%A5%E5%AE%9E%E7%8E%B0\">\u00a01.2\u63d2\u5165\u5b9e\u73b0<\/h3>\n<p>\u5f53\u4f20\u5165value\u503c\u65f6&#xff0c;\u5224\u65adroot\u8282\u70b9\u662f\u5426\u4e3a\u7a7a&#xff1a;\u7a7a\u7684\u8bdd\u5efa\u7acb\u65b0\u8282\u70b9\u505aroot&#xff1b;\u4e0d\u7a7a&#xff0c;\u5efa\u7acb\u4e00\u4e2a\u4e2d\u95f4\u8282\u70b9index&#xff0c;\u7136\u540e\u5faa\u73af\u6309\u7167\u63d2\u5165\u539f\u7406\u5224\u65ad\u63d2\u5230\u54ea&#xff0c;\u4ee3\u7801\u5982\u4e0b&#xff1a;<\/p>\n<p> public void insert(int value){<br \/>\n        Node node &#061; new Node(value);<br \/>\n        if(root&#061;&#061;null){<br \/>\n            root &#061; node;<br \/>\n            return;<br \/>\n        }<br \/>\n        Node index &#061; root;<br \/>\n        while(true) {<br \/>\n            if(index.value&gt;value) {<br \/>\n                \/\/\u8981\u63d2\u5165\u7684\u8282\u70b9\u503c\u5c0f<br \/>\n                if(index.left&#061;&#061;null) {<br \/>\n                    \/\/\u63d2\u5165<br \/>\n                    index.left&#061;node;<br \/>\n                    return;<br \/>\n                }<br \/>\n                index&#061;index.left;<br \/>\n            }else{<br \/>\n                \/\/\u8981\u63d2\u5165\u7684\u8282\u70b9\u503c\u5927<br \/>\n                if(index.right&#061;&#061;null){<br \/>\n                    index.right&#061;node;<br \/>\n                    return;<br \/>\n                }<br \/>\n                index&#061;index.right;<br \/>\n            }<br \/>\n        } <\/p>\n<h2 id=\"2.%E5%B9%BF%E5%BA%A6%E4%BC%98%E5%85%88%E9%81%8D%E5%8E%86--%E9%98%9F%E5%88%97%E5%AE%9E%E7%8E%B0\">2.\u5e7f\u5ea6\u4f18\u5148\u904d\u5386&#8211;\u961f\u5217\u5b9e\u73b0<\/h2>\n<p>\u5e7f\u5ea6\u4f18\u5148\u904d\u5386\u5c31\u662f\u5c42\u6b21\u904d\u5386&#xff0c;\u4f7f\u7528\u961f\u5217\u5b9e\u73b0\u3002\u5f53\u961f\u5217\u4e2d\u8fdb\u5165\u4e00\u4e2a\u65b0\u8282\u70b9&#xff0c;\u8f93\u51fa\u540e\u5c31\u627e\u8fd9\u4e2a\u8282\u70b9\u7684\u5de6\u53f3\u5b69\u5b50\u5165\u961f\u3002<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b&#xff1a;<\/p>\n<p>    public void levelOrder() {<br \/>\n        Queue&lt;Node&gt; queue &#061; new LinkedList&lt;Node&gt;();<br \/>\n        if(root!&#061;null) {<br \/>\n            queue.add(root);<br \/>\n        }<br \/>\n        Node index;<br \/>\n        while (!queue.isEmpty()){<br \/>\n            index &#061; queue.poll();<br \/>\n            System.out.print(index.value&#043;Messages.getString(&#034;BinaryTree.0&#034;)); \/\/$NON-NLS-1$<br \/>\n            if(index.left!&#061;null){<br \/>\n                queue.add(index.left);<br \/>\n            }<br \/>\n            if(index.right!&#061;null) {<br \/>\n                queue.add(index.right);<br \/>\n            }<br \/>\n        }<br \/>\n            System.out.println();<br \/>\n    } <\/p>\n<h2 id=\"3.%E6%B7%B1%E5%BA%A6%E4%BC%98%E5%85%88%E9%81%8D%E5%8E%86--%E9%80%92%E5%BD%92%E5%AE%9E%E7%8E%B0\">3.\u6df1\u5ea6\u4f18\u5148\u904d\u5386&#8211;\u9012\u5f52\u5b9e\u73b0<\/h2>\n<h3 id=\"3.1%E5%85%88%E5%BA%8F%E9%81%8D%E5%8E%86\">3.1\u5148\u5e8f\u904d\u5386<\/h3>\n<p>\u5c31\u662f\u6839-\u5de6-\u53f3\u7684\u987a\u5e8f&#xff0c;\u4f7f\u7528\u9012\u5f52\u5b9e\u73b0&#xff0c;\u4ee3\u7801\u5982\u4e0b&#xff1a;<\/p>\n<p>    \/*<br \/>\n     * \u5148\u5e8f\u904d\u5386<br \/>\n     *\/<br \/>\n    public void beforeOrder(Node node){<br \/>\n        if(node&#061;&#061;null) {<br \/>\n        return;<br \/>\n        }<br \/>\n        System.out.print(node.value&#043;Messages.getString(&#034;BinaryTree.1&#034;));<br \/>\n        beforeOrder(node.left);<br \/>\n        beforeOrder(node.right);<br \/>\n    } <\/p>\n<h3 id=\"3.2%E4%B8%AD%E5%BA%8F%E9%81%8D%E5%8E%86\">3.2\u4e2d\u5e8f\u904d\u5386<\/h3>\n<p>\u4f7f\u7528\u5de6-\u6839-\u53f3\u987a\u5e8f<\/p>\n<p>    \/*<br \/>\n     * \u4e2d\u5e8f\u904d\u5386<br \/>\n     *\/<br \/>\n    public void inOrder(Node node){<br \/>\n        if(node&#061;&#061;null){<br \/>\n            return;<br \/>\n        }<br \/>\n        inOrder(node.left);<br \/>\n        System.out.print(node.value&#043;Messages.getString(&#034;BinaryTree.2&#034;)); \/\/$NON-NLS-1$<br \/>\n        inOrder(node.right);<br \/>\n    } <\/p>\n<h3 id=\"3.3%E5%90%8E%E5%BA%8F%E9%81%8D%E5%8E%86\">3.3\u540e\u5e8f\u904d\u5386<\/h3>\n<p>\u4f7f\u7528\u5de6-\u53f3-\u6839\u987a\u5e8f&#xff0c;\u4ee3\u7801\u5982\u4e0b&#xff1a;<\/p>\n<p>    \/*<br \/>\n     * \u540e\u5e8f\u904d\u5386<br \/>\n     *\/<br \/>\n    public void afterOrder(Node node) {<br \/>\n        if(node&#061;&#061;null) {<br \/>\n        return;<br \/>\n        }<br \/>\n        afterOrder(node.left);<br \/>\n        afterOrder(node.right);<br \/>\n        System.out.print(node.value&#043;Messages.getString(&#034;BinaryTree.3&#034;));<br \/>\n    } <\/p>\n<h2 id=\"4.%E5%88%A0%E9%99%A4\">4.\u5220\u9664<\/h2>\n<p>\u5220\u9664\u6bd4\u8f83\u590d\u6742&#xff0c;\u8981\u5206\u4e09\u79cd\u60c5\u51b5&#xff1a;<\/p>\n<h3 id=\"4.1%E5%88%A0%E9%99%A4%E5%8F%B6%E5%AD%90%E8%8A%82%E7%82%B9\">4.1\u5220\u9664\u53f6\u5b50\u8282\u70b9<\/h3>\n<li>\u627e\u5230\u76ee\u6807\u8282\u70b9&#xff1a;\u5728\u4e8c\u53c9\u641c\u7d22\u6811\u4e2d\u5b9a\u4f4d\u8981\u5220\u9664\u7684\u76ee\u6807\u8282\u70b9target\u00a0\u3002<\/li>\n<li>\u627e\u5230\u7236\u8282\u70b9&#xff1a;\u786e\u5b9atarget\u8282\u70b9\u7684\u7236\u8282\u70b9parent\u00a0\u3002<\/li>\n<li>\u5224\u65ad\u7236\u8282\u70b9\u60c5\u51b5&#xff1a;\n<ul>\n<li>\u82e5\u65e0\u7236\u8282\u70b9&#xff0c;\u610f\u5473\u7740target\u662f\u6839\u8282\u70b9&#xff0c;\u76f4\u63a5\u5c06\u6839\u8282\u70b9\u7f6e\u4e3anull\u00a0\u3002<\/li>\n<li>\u82e5\u6709\u7236\u8282\u70b9&#xff0c;\u5224\u65adtarget\u662fparent\u7684\u5de6\u5b50\u8fd8\u662f\u53f3\u5b50&#xff1a;\u662f\u5de6\u5b50\u5c31\u6267\u884cparent.left &#061; null\u00a0&#xff1b;\u662f\u53f3\u5b50\u5c31\u6267\u884cparent.right &#061; null\u00a0\u3002<\/li>\n<\/ul>\n<\/li>\n<p>\u9700\u8981\u989d\u5916\u5199\u4e00\u4e2a\u51fd\u6570\u6765\u5bfb\u627e\u7236\u8282\u70b9&#xff0c;\u4ee3\u7801\u5982\u4e0b&#xff1a;<\/p>\n<p>    \/**<br \/>\n * \u627e\u76ee\u6807\u503c\u7684\u7236\u8282\u70b9<br \/>\n *\/<br \/>\npublic Node searchParent(int value) {<br \/>\nif(root&#061;&#061;null) {<br \/>\nreturn null;<br \/>\n}<br \/>\nNode index &#061; root;<br \/>\nwhile (index!&#061;null) {<br \/>\nif((index.left!&#061;null&amp;&amp;index.left.value&#061;&#061;value)||(index.right!&#061;null&amp;&amp;index.right.value&#061;&#061;value)) {<br \/>\nreturn index;<br \/>\n}else if (index.value&gt;value) {<br \/>\nindex&#061;index.left;<br \/>\n}else {<br \/>\nindex &#061; index.right;<br \/>\n}<\/p>\n<p>}<br \/>\nreturn null;<br \/>\n} <\/p>\n<p>\u8fd9\u90e8\u5206\u4ee3\u7801\u5982\u4e0b&#xff1a;<\/p>\n<p>if(target.left&#061;&#061;null&amp;&amp;target.right&#061;&#061;null) {<br \/>\n\/\/\u53f6\u5b50\u8282\u70b9<br \/>\n\/\/\u6ca1\u6709\u7236\u8282\u70b9<br \/>\nif(parent&#061;&#061;null) {<br \/>\nroot&#061;null;<br \/>\nreturn;<br \/>\n}<br \/>\n\/\/\u6709\u7236\u8282\u70b9<br \/>\nif(parent.left!&#061;null&amp;&amp;parent.left.value&#061;&#061;value) {<br \/>\nparent.left&#061;null;<br \/>\n}else {<br \/>\nparent.right&#061;null;<br \/>\n}<\/p>\n<p>} <\/p>\n<h3 id=\"4.2%E5%88%A0%E9%99%A4%E6%9C%89%E4%B8%80%E6%A3%B5%E5%AD%90%E6%A0%91%E7%9A%84%E8%8A%82%E7%82%B9\">4.2\u5220\u9664\u6709\u4e00\u68f5\u5b50\u6811\u7684\u8282\u70b9<\/h3>\n<li>\u627e\u5230\u76ee\u6807\u8282\u70b9&#xff1a;\u786e\u5b9a\u8981\u5220\u9664\u7684\u8282\u70b9target\u00a0\u3002<\/li>\n<li>\u627e\u5230\u7236\u8282\u70b9&#xff1a;\u627e\u5230target\u8282\u70b9\u7684\u7236\u8282\u70b9parent\u00a0\u3002<\/li>\n<li>\u5224\u65ad\u7236\u8282\u70b9\u548c\u5b50\u6811\u60c5\u51b5&#xff1a;\n<ul>\n<li>\u82e5\u65e0\u7236\u8282\u70b9&#xff0c;\u5373target\u662f\u6839\u8282\u70b9&#xff0c;\u82e5target\u6709\u5de6\u5b50\u6811&#xff0c;\u8ba9\u6839\u8282\u70b9\u6307\u5411\u5176\u5de6\u5b50\u6811&#xff08;root &#061; root.left\u00a0&#xff09;&#xff1b;\u82e5\u6709\u53f3\u5b50\u6811&#xff0c;\u8ba9\u6839\u8282\u70b9\u6307\u5411\u5176\u53f3\u5b50\u6811&#xff08;root &#061; root.right\u00a0&#xff09;\u3002<\/li>\n<li>\u82e5\u6709\u7236\u8282\u70b9&#xff0c;\u5148\u786e\u5b9atarget\u662fparent\u7684\u5de6\u5b50\u8fd8\u662f\u53f3\u5b50&#xff0c;\u518d\u6839\u636etarget\u81ea\u8eab\u6709\u5de6\u5b50\u6811\u8fd8\u662f\u53f3\u5b50\u6811&#xff0c;\u8c03\u6574parent\u76f8\u5e94\u5b50\u6811\u6307\u9488&#xff08;\u5982parent.left &#061; target.left\u00a0\u6216parent.right &#061; target.right\u00a0&#xff09;\u3002<\/li>\n<\/ul>\n<\/li>\n<p>\u4ee3\u7801\u5982\u4e0b&#xff1a;<\/p>\n<p>\/\/\u6709\u4e00\u68f5\u5b50\u6811\u7684\u8282\u70b9<br \/>\n\/\/\u6ca1\u6709\u7236\u8282\u70b9<br \/>\nif(parent&#061;&#061;null) {<br \/>\n\/\/\u76ee\u6807\u8282\u70b9\u6709\u5de6\u5b50\u6811\u8fd8\u662f\u53f3\u5b50\u6811<br \/>\nif(target.left!&#061;null) {<br \/>\nroot &#061; root.left;<br \/>\n}else {<br \/>\nroot&#061;root.right;<br \/>\n}<br \/>\nreturn;<br \/>\n}<br \/>\n\/\/\u6709\u7236\u8282\u70b9<br \/>\n\/\/\u5224\u65ad\u76ee\u6807\u8282\u70b9\u662f\u7236\u8282\u70b9\u7684\u5de6\u5b69\u5b50\u8fd8\u662f\u53f3\u5b69\u5b50<br \/>\nif(parent.left!&#061;null&amp;&amp;parent.left.value&#061;&#061;value) {<br \/>\n\/\/\u5de6\u5b69\u5b50<br \/>\n\/\/\u76ee\u6807\u8282\u70b9\u6709\u5de6\u5b50\u6811\u8fd8\u662f\u53f3\u5b50\u6811<br \/>\nif(target.left!&#061;null) {<br \/>\nparent.left &#061; target.left;<br \/>\n}else {<br \/>\nparent.left &#061; target.right;<br \/>\n}<\/p>\n<p>}else {<br \/>\n\/\/\u53f3\u5b69\u5b50<br \/>\n\/\/\u76ee\u6807\u8282\u70b9\u6709\u5de6\u5b50\u6811\u8fd8\u662f\u53f3\u5b50\u6811<br \/>\nif(target.left!&#061;null) {<br \/>\nparent.right &#061; target.left;<br \/>\n}else {<br \/>\nparent.right &#061; target.right;<br \/>\n}<br \/>\n} <\/p>\n<h3 id=\"4.3%E5%88%A0%E9%99%A4%E6%9C%89%E4%B8%A4%E6%A3%B5%E5%AD%90%E6%A0%91%E7%9A%84%E8%8A%82%E7%82%B9\">4.3\u5220\u9664\u6709\u4e24\u68f5\u5b50\u6811\u7684\u8282\u70b9<\/h3>\n<li>\u627e\u5230\u76ee\u6807\u8282\u70b9&#xff1a;\u5b9a\u4f4d\u8981\u5220\u9664\u7684\u8282\u70b9target\u00a0\u3002<\/li>\n<li>\u66ff\u6362\u8282\u70b9\u9009\u62e9&#xff1a;\u83b7\u53d6target\u5de6\u5b50\u6811\u7684\u6700\u5927\u503c\u8282\u70b9\u6216\u8005\u53f3\u5b50\u6811\u7684\u6700\u5c0f\u503c\u8282\u70b9\u4f5c\u4e3a\u66ff\u6362\u8282\u70b9\u3002<\/li>\n<li>\u5220\u9664\u76ee\u6807\u8282\u70b9&#xff1a;\u7528\u9009\u5b9a\u7684\u66ff\u6362\u8282\u70b9\u66ff\u4ee3target\u8282\u70b9\u7684\u4f4d\u7f6e &#xff0c;\u5e76\u5904\u7406\u597d\u76f8\u5173\u5b50\u6811\u8fde\u63a5\u5173\u7cfb&#xff08;\u5982parent.left &#061; target.right\u00a0\u6216parent.right &#061; target.left\u00a0\u7b49&#xff09;\u3002<\/li>\n<p>\u9700\u8981\u989d\u5916\u5199\u4e00\u4e2a\u5224\u65ad\u6700\u5c0f\u503c\u7684\u51fd\u6570&#xff1a;<\/p>\n<p>\/**<br \/>\n * \u627e\u6811\u5f53\u4e2d\u7684\u6700\u5c0f\u503c<br \/>\n *\/<br \/>\npublic int min(Node node) {<br \/>\nNode index &#061; node;<br \/>\nwhile(index.left!&#061;null) {<br \/>\nindex&#061;index.left;<br \/>\n}<br \/>\nreturn index.value;<br \/>\n} <\/p>\n<p>\u00a0<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b&#xff1a;<\/p>\n<p> if(target.left!&#061;null&amp;&amp;target.right!&#061;null) {<br \/>\n\/\/\u6709\u4e24\u68f5\u5b50\u6811\u7684\u8282\u70b9<br \/>\nint minVal &#061; min(target.right);<br \/>\ndelete(minVal);<br \/>\ntarget.value &#061; minVal;<\/p>\n<p>} <\/p>\n<h2 id=\"5.%E6%95%B4%E4%BD%93%E4%BB%A3%E7%A0%81\">5.\u6574\u4f53\u4ee3\u7801<\/h2>\n<p>\u4ee3\u7801\u5982\u4e0b&#xff1a;<\/p>\n<p>package com.qcby.\u6811;<\/p>\n<p>import java.util.LinkedList;<br \/>\nimport java.util.Queue;<\/p>\n<p>public class BinaryTree {<br \/>\n    Node root;<br \/>\n    \/**<br \/>\n     * \u63d2\u5165<br \/>\n     *\/<br \/>\n    public void insert(int value){<br \/>\n        Node node &#061; new Node(value);<br \/>\n        if(root&#061;&#061;null){<br \/>\n            root &#061; node;<br \/>\n            return;<br \/>\n        }<br \/>\n        Node index &#061; root;<br \/>\n        while(true) {<br \/>\n            if(index.value&gt;value) {<br \/>\n                \/\/\u8981\u63d2\u5165\u7684\u8282\u70b9\u503c\u5c0f<br \/>\n                if(index.left&#061;&#061;null) {<br \/>\n                    \/\/\u63d2\u5165<br \/>\n                    index.left&#061;node;<br \/>\n                    return;<br \/>\n                }<br \/>\n                index&#061;index.left;<br \/>\n            }else{<br \/>\n                \/\/\u8981\u63d2\u5165\u7684\u8282\u70b9\u503c\u5927<br \/>\n                if(index.right&#061;&#061;null){<br \/>\n                    index.right&#061;node;<br \/>\n                    return;<br \/>\n                }<br \/>\n                index&#061;index.right;<br \/>\n            }<br \/>\n        }<br \/>\n    }<br \/>\n    \/*<br \/>\n     * \u5e7f\u5ea6\u4f18\u5148\u904d\u5386<br \/>\n     *\/<br \/>\n    public void levelOrder() {<br \/>\n        Queue&lt;Node&gt; queue &#061; new LinkedList&lt;Node&gt;();<br \/>\n        if(root!&#061;null) {<br \/>\n            queue.add(root);<br \/>\n        }<br \/>\n        Node index;<br \/>\n        while (!queue.isEmpty()){<br \/>\n            index &#061; queue.poll();<br \/>\n            System.out.print(index.value&#043;Messages.getString(&#034;BinaryTree.0&#034;)); \/\/$NON-NLS-1$<br \/>\n            if(index.left!&#061;null){<br \/>\n                queue.add(index.left);<br \/>\n            }<br \/>\n            if(index.right!&#061;null) {<br \/>\n                queue.add(index.right);<br \/>\n            }<br \/>\n        }<br \/>\n            System.out.println();<br \/>\n    }<br \/>\n    \/*<br \/>\n     * \u5148\u5e8f\u904d\u5386<br \/>\n     *\/<br \/>\n    public void beforeOrder(Node node){<br \/>\n        if(node&#061;&#061;null) {<br \/>\n        return;<br \/>\n        }<br \/>\n        System.out.print(node.value&#043;Messages.getString(&#034;BinaryTree.1&#034;)); \/\/$NON-NLS-1$<br \/>\n        beforeOrder(node.left);<br \/>\n        beforeOrder(node.right);<br \/>\n    }<br \/>\n    \/*<br \/>\n     * \u4e2d\u5e8f\u904d\u5386<br \/>\n     *\/<br \/>\n    public void inOrder(Node node){<br \/>\n        if(node&#061;&#061;null){<br \/>\n            return;<br \/>\n        }<br \/>\n        inOrder(node.left);<br \/>\n        System.out.print(node.value&#043;Messages.getString(&#034;BinaryTree.2&#034;)); \/\/$NON-NLS-1$<br \/>\n        inOrder(node.right);<br \/>\n    }<br \/>\n    \/*<br \/>\n     * \u540e\u5e8f\u904d\u5386<br \/>\n     *\/<br \/>\n    public void afterOrder(Node node) {<br \/>\n        if(node&#061;&#061;null) {<br \/>\n        return;<br \/>\n        }<br \/>\n        afterOrder(node.left);<br \/>\n        afterOrder(node.right);<br \/>\n        System.out.print(node.value&#043;Messages.getString(&#034;BinaryTree.3&#034;)); \/\/$NON-NLS-1$<br \/>\n    }<br \/>\n    \/*<br \/>\n     * \u67e5\u627e<br \/>\n     *\/<br \/>\n    public Node search(int value) {<br \/>\n        if(root&#061;&#061;null) {<br \/>\n            return null;<br \/>\n        }<br \/>\n        Node index &#061; root;<br \/>\n        while (index!&#061;null) {<br \/>\n            if(index.value&#061;&#061;value){<br \/>\n                return index;<br \/>\n            }else if(index.value&gt;value) {<br \/>\n                index &#061; index.left;<br \/>\n            }else {<br \/>\n                index&#061;index.right;<br \/>\n            }<br \/>\n        }<br \/>\n        return null;<br \/>\n    }<br \/>\n    \/**<br \/>\n * \u627e\u76ee\u6807\u503c\u7684\u7236\u8282\u70b9<br \/>\n *\/<br \/>\npublic Node searchParent(int value) {<br \/>\nif(root&#061;&#061;null) {<br \/>\nreturn null;<br \/>\n}<br \/>\nNode index &#061; root;<br \/>\nwhile (index!&#061;null) {<br \/>\nif((index.left!&#061;null&amp;&amp;index.left.value&#061;&#061;value)||(index.right!&#061;null&amp;&amp;index.right.value&#061;&#061;value)) {<br \/>\nreturn index;<br \/>\n}else if (index.value&gt;value) {<br \/>\nindex&#061;index.left;<br \/>\n}else {<br \/>\nindex &#061; index.right;<br \/>\n}<\/p>\n<p>}<br \/>\nreturn null;<br \/>\n}<\/p>\n<p>\/**<br \/>\n * \u627e\u6811\u5f53\u4e2d\u7684\u6700\u5c0f\u503c<br \/>\n *\/<br \/>\npublic int min(Node node) {<br \/>\nNode index &#061; node;<br \/>\nwhile(index.left!&#061;null) {<br \/>\nindex&#061;index.left;<br \/>\n}<br \/>\nreturn index.value;<br \/>\n}<\/p>\n<p>\/**<br \/>\n * \u5220\u9664<br \/>\n *\/<br \/>\npublic void delete(int value){<br \/>\nif(root&#061;&#061;null) {<br \/>\nSystem.out.println(Messages.getString(&#034;BinaryTree.4&#034;));<br \/>\nreturn;<br \/>\n}<br \/>\n\/\/\u627e\u76ee\u6807\u8282\u70b9<br \/>\nNode target &#061; search(value);<br \/>\nif(target&#061;&#061;null) {<br \/>\nSystem.out.println(Messages.getString(&#034;BinaryTree.5&#034;));<br \/>\nreturn;<br \/>\n}<br \/>\n\/\/\u627e\u76ee\u6807\u8282\u70b9\u7684\u7236\u8282\u70b9<br \/>\nNode parent &#061; searchParent(value);<\/p>\n<p>\/\/\u4e09\u79cd\u60c5\u51b5&#xff0c;\u5206\u60c5\u51b5\u8ba8\u8bba<br \/>\nif(target.left&#061;&#061;null&amp;&amp;target.right&#061;&#061;null) {<br \/>\n\/\/\u53f6\u5b50\u8282\u70b9<br \/>\n\/\/\u6ca1\u6709\u7236\u8282\u70b9<br \/>\nif(parent&#061;&#061;null) {<br \/>\nroot&#061;null;<br \/>\nreturn;<br \/>\n}<br \/>\n\/\/\u6709\u7236\u8282\u70b9<br \/>\nif(parent.left!&#061;null&amp;&amp;parent.left.value&#061;&#061;value) {<br \/>\nparent.left&#061;null;<br \/>\n}else {<br \/>\nparent.right&#061;null;<br \/>\n}<\/p>\n<p>}else if(target.left!&#061;null&amp;&amp;target.right!&#061;null) {<br \/>\n\/\/\u6709\u4e24\u68f5\u5b50\u6811\u7684\u8282\u70b9<br \/>\nint minVal &#061; min(target.right);<br \/>\ndelete(minVal);<br \/>\ntarget.value &#061; minVal;<\/p>\n<p>}else {<br \/>\n\/\/\u6709\u4e00\u68f5\u5b50\u6811\u7684\u8282\u70b9<br \/>\n\/\/\u6ca1\u6709\u7236\u8282\u70b9<br \/>\nif(parent&#061;&#061;null) {<br \/>\n\/\/\u76ee\u6807\u8282\u70b9\u6709\u5de6\u5b50\u6811\u8fd8\u662f\u53f3\u5b50\u6811<br \/>\nif(target.left!&#061;null) {<br \/>\nroot &#061; root.left;<br \/>\n}else {<br \/>\nroot&#061;root.right;<br \/>\n}<br \/>\nreturn;<br \/>\n}<br \/>\n\/\/\u6709\u7236\u8282\u70b9<br \/>\n\/\/\u5224\u65ad\u76ee\u6807\u8282\u70b9\u662f\u7236\u8282\u70b9\u7684\u5de6\u5b69\u5b50\u8fd8\u662f\u53f3\u5b69\u5b50<br \/>\nif(parent.left!&#061;null&amp;&amp;parent.left.value&#061;&#061;value) {<br \/>\n\/\/\u5de6\u5b69\u5b50<br \/>\n\/\/\u76ee\u6807\u8282\u70b9\u6709\u5de6\u5b50\u6811\u8fd8\u662f\u53f3\u5b50\u6811<br \/>\nif(target.left!&#061;null) {<br \/>\nparent.left &#061; target.left;<br \/>\n}else {<br \/>\nparent.left &#061; target.right;<br \/>\n}<\/p>\n<p>}else {<br \/>\n\/\/\u53f3\u5b69\u5b50<br \/>\n\/\/\u76ee\u6807\u8282\u70b9\u6709\u5de6\u5b50\u6811\u8fd8\u662f\u53f3\u5b50\u6811<br \/>\nif(target.left!&#061;null) {<br \/>\nparent.right &#061; target.left;<br \/>\n}else {<br \/>\nparent.right &#061; target.right;<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\n&#064;Override<br \/>\npublic String toString() {<br \/>\nreturn &#034;BinaryTree [root&#061;&#034; &#043; root &#043; &#034;]&#034;;<br \/>\n}<\/p>\n<p>} <\/p>\n<p>\u00a0<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb973\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u5f53\u4f20\u5165value\u503c\u65f6\uff0c\u5224\u65adroot\u8282\u70b9\u662f\u5426\u4e3a\u7a7a\uff1a\u7a7a\u7684\u8bdd\u5efa\u7acb\u65b0\u8282\u70b9\u505aroot\uff1b\u5e7f\u5ea6\u4f18\u5148\u904d\u5386\u5c31\u662f\u5c42\u6b21\u904d\u5386\uff0c\u4f7f\u7528\u961f\u5217\u5b9e\u73b0\u3002\u5f53\u961f\u5217\u4e2d\u8fdb\u5165\u4e00\u4e2a\u65b0\u8282\u70b9\uff0c\u8f93\u51fa\u540e\u5c31\u627e\u8fd9\u4e2a\u8282\u70b9\u7684\u5de6\u53f3\u5b69\u5b50\u5165\u961f\u30021.1\u539f\u7406\uff1a\u5de6\u8fb9\u8282\u70b9\u503c\u5c0f\u4e8e\u7236\u8282\u70b9\uff0c\u53f3\u8fb9\u8282\u70b9\u503c\u5927\u4e8e\u7236\u8282\u70b9\uff0c\u770b\u4e0b\u56fe\u3002\u8fd9\u90e8\u5206\u4e3b\u8981\u662f\u7528\u4ee3\u7801\u5b9e\u73b0\u4e8c\u53c9\u6811\u53ca\u6709\u5e8f\u4e8c\u53c9\u6811\u30022.\u5e7f\u5ea6\u4f18\u5148\u904d\u5386&#8211;\u961f\u5217\u5b9e\u73b0\u30023.\u6df1\u5ea6\u4f18\u5148\u904d\u5386&#8211;\u9012\u5f52\u5b9e\u73b0\u3002<\/p>\n","protected":false},"author":2,"featured_media":38218,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,3332,371,1813],"topic":[],"class_list":{"0":"post-38219","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-java","10":"tag-371","11":"tag-1813"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>java\u5b66\u4e60\u4e4b\u6570\u636e\u7ed3\u6784\uff1a\u56db\u3001\u6811\uff08\u4ee3\u7801\u8865\u5145\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/38219.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"java\u5b66\u4e60\u4e4b\u6570\u636e\u7ed3\u6784\uff1a\u56db\u3001\u6811\uff08\u4ee3\u7801\u8865\u5145\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb973\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u5f53\u4f20\u5165value\u503c\u65f6\uff0c\u5224\u65adroot\u8282\u70b9\u662f\u5426\u4e3a\u7a7a\uff1a\u7a7a\u7684\u8bdd\u5efa\u7acb\u65b0\u8282\u70b9\u505aroot\uff1b\u5e7f\u5ea6\u4f18\u5148\u904d\u5386\u5c31\u662f\u5c42\u6b21\u904d\u5386\uff0c\u4f7f\u7528\u961f\u5217\u5b9e\u73b0\u3002\u5f53\u961f\u5217\u4e2d\u8fdb\u5165\u4e00\u4e2a\u65b0\u8282\u70b9\uff0c\u8f93\u51fa\u540e\u5c31\u627e\u8fd9\u4e2a\u8282\u70b9\u7684\u5de6\u53f3\u5b69\u5b50\u5165\u961f\u30021.1\u539f\u7406\uff1a\u5de6\u8fb9\u8282\u70b9\u503c\u5c0f\u4e8e\u7236\u8282\u70b9\uff0c\u53f3\u8fb9\u8282\u70b9\u503c\u5927\u4e8e\u7236\u8282\u70b9\uff0c\u770b\u4e0b\u56fe\u3002\u8fd9\u90e8\u5206\u4e3b\u8981\u662f\u7528\u4ee3\u7801\u5b9e\u73b0\u4e8c\u53c9\u6811\u53ca\u6709\u5e8f\u4e8c\u53c9\u6811\u30022.\u5e7f\u5ea6\u4f18\u5148\u904d\u5386--\u961f\u5217\u5b9e\u73b0\u30023.\u6df1\u5ea6\u4f18\u5148\u904d\u5386--\u9012\u5f52\u5b9e\u73b0\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/38219.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-19T17:04:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250519170425-682b649935131.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/38219.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/38219.html\",\"name\":\"java\u5b66\u4e60\u4e4b\u6570\u636e\u7ed3\u6784\uff1a\u56db\u3001\u6811\uff08\u4ee3\u7801\u8865\u5145\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-19T17:04:26+00:00\",\"dateModified\":\"2025-05-19T17:04:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/38219.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/38219.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/38219.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"java\u5b66\u4e60\u4e4b\u6570\u636e\u7ed3\u6784\uff1a\u56db\u3001\u6811\uff08\u4ee3\u7801\u8865\u5145\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"java\u5b66\u4e60\u4e4b\u6570\u636e\u7ed3\u6784\uff1a\u56db\u3001\u6811\uff08\u4ee3\u7801\u8865\u5145\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/38219.html","og_locale":"zh_CN","og_type":"article","og_title":"java\u5b66\u4e60\u4e4b\u6570\u636e\u7ed3\u6784\uff1a\u56db\u3001\u6811\uff08\u4ee3\u7801\u8865\u5145\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb973\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u5f53\u4f20\u5165value\u503c\u65f6\uff0c\u5224\u65adroot\u8282\u70b9\u662f\u5426\u4e3a\u7a7a\uff1a\u7a7a\u7684\u8bdd\u5efa\u7acb\u65b0\u8282\u70b9\u505aroot\uff1b\u5e7f\u5ea6\u4f18\u5148\u904d\u5386\u5c31\u662f\u5c42\u6b21\u904d\u5386\uff0c\u4f7f\u7528\u961f\u5217\u5b9e\u73b0\u3002\u5f53\u961f\u5217\u4e2d\u8fdb\u5165\u4e00\u4e2a\u65b0\u8282\u70b9\uff0c\u8f93\u51fa\u540e\u5c31\u627e\u8fd9\u4e2a\u8282\u70b9\u7684\u5de6\u53f3\u5b69\u5b50\u5165\u961f\u30021.1\u539f\u7406\uff1a\u5de6\u8fb9\u8282\u70b9\u503c\u5c0f\u4e8e\u7236\u8282\u70b9\uff0c\u53f3\u8fb9\u8282\u70b9\u503c\u5927\u4e8e\u7236\u8282\u70b9\uff0c\u770b\u4e0b\u56fe\u3002\u8fd9\u90e8\u5206\u4e3b\u8981\u662f\u7528\u4ee3\u7801\u5b9e\u73b0\u4e8c\u53c9\u6811\u53ca\u6709\u5e8f\u4e8c\u53c9\u6811\u30022.\u5e7f\u5ea6\u4f18\u5148\u904d\u5386--\u961f\u5217\u5b9e\u73b0\u30023.\u6df1\u5ea6\u4f18\u5148\u904d\u5386--\u9012\u5f52\u5b9e\u73b0\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/38219.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-19T17:04:26+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/05\/20250519170425-682b649935131.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/38219.html","url":"https:\/\/www.wsisp.com\/helps\/38219.html","name":"java\u5b66\u4e60\u4e4b\u6570\u636e\u7ed3\u6784\uff1a\u56db\u3001\u6811\uff08\u4ee3\u7801\u8865\u5145\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-19T17:04:26+00:00","dateModified":"2025-05-19T17:04:26+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/38219.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/38219.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/38219.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"java\u5b66\u4e60\u4e4b\u6570\u636e\u7ed3\u6784\uff1a\u56db\u3001\u6811\uff08\u4ee3\u7801\u8865\u5145\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/38219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=38219"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/38219\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/38218"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=38219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=38219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=38219"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=38219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}