{"id":493,"date":"2025-04-04T00:00:14","date_gmt":"2025-04-03T16:00:14","guid":{"rendered":"https:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/"},"modified":"2025-04-04T00:00:14","modified_gmt":"2025-04-03T16:00:14","slug":"java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0","status":"publish","type":"post","link":"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/","title":{"rendered":"Java#9(\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60)"},"content":{"rendered":"<div class=\"article_content clearfix\" id=\"article_content\">\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/kdoc_html_views-1a98987dfd.css\" rel=\"stylesheet\"\/>\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/ck_htmledit_views-704d5b9767.css\" rel=\"stylesheet\"\/>\n<div class=\"htmledit_views\" id=\"content_views\">\n<p id=\"main-toc\">\n   <strong><br \/>\n    \u76ee\u5f55<br \/>\n   <\/strong>\n  <\/p>\n<p id=\"%E4%B8%80.%E6%96%87%E5%AD%97%E6%A0%BC%E6%96%97%E6%B8%B8%E6%88%8F-toc\" style=\"margin-left:40px;\">\n   <a href=\"#%E4%B8%80.%E6%96%87%E5%AD%97%E6%A0%BC%E6%96%97%E6%B8%B8%E6%88%8F\" rel=\"nofollow\"><br \/>\n    \u4e00.\u6587\u5b57\u683c\u6597\u6e38\u620f<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%C2%A0%E4%BA%8C.%E5%AF%B9%E8%B1%A1%E6%95%B0%E7%BB%84-toc\" style=\"margin-left:40px;\">\n   <a href=\"#%C2%A0%E4%BA%8C.%E5%AF%B9%E8%B1%A1%E6%95%B0%E7%BB%84\" rel=\"nofollow\"><br \/>\n    \u4e8c.\u5bf9\u8c61\u6570\u7ec4<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%E4%B8%89.%E9%94%AE%E7%9B%98%E5%BD%95%E5%85%A5%E7%BB%83%E4%B9%A0-toc\" style=\"margin-left:40px;\">\n   <a href=\"#%E4%B8%89.%E9%94%AE%E7%9B%98%E5%BD%95%E5%85%A5%E7%BB%83%E4%B9%A0\" rel=\"nofollow\"><br \/>\n    \u4e09.\u952e\u76d8\u5f55\u5165\u7ec3\u4e60<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%E5%9B%9B.%E5%A4%8D%E6%9D%82%E5%AF%B9%E8%B1%A1%E6%95%B0%E7%BB%84%E7%BB%83%E4%B9%A0-toc\" style=\"margin-left:40px;\">\n   <a href=\"#%E5%9B%9B.%E5%A4%8D%E6%9D%82%E5%AF%B9%E8%B1%A1%E6%95%B0%E7%BB%84%E7%BB%83%E4%B9%A0\" rel=\"nofollow\"><br \/>\n    \u56db.\u590d\u6742\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%E9%A2%98%E7%9B%AE%E8%A6%81%E6%B1%82%3A-toc\" style=\"margin-left:80px;\">\n   <a href=\"#%E9%A2%98%E7%9B%AE%E8%A6%81%E6%B1%82%3A\" rel=\"nofollow\"><br \/>\n    \u9898\u76ee\u8981\u6c42:<br \/>\n   <\/a>\n  <\/p>\n<hr id=\"hr-toc\"\/>\n<blockquote>\n<h3 id=\"%E4%B8%80.%E6%96%87%E5%AD%97%E6%A0%BC%E6%96%97%E6%B8%B8%E6%88%8F\">\n    \u4e00.\u6587\u5b57\u683c\u6597\u6e38\u620f<br \/>\n   <\/h3>\n<p>\n    Role\u7c7b\u7684\u4ee3\u7801\n   <\/p>\n<pre><code class=\"language-java\">package Game;\n\nimport java.util.Random;\n\npublic class Role {\n    String name;\n    int blood;\n\n    public Role() {\n    }\n\n    public Role(String name, int blood) {\n        this.name = name;\n        this.blood = blood;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public int getBlood() {\n        return blood;\n    }\n\n    public void setBlood(int blood) {\n        this.blood = blood;\n    }\n\n    \/\/\u901a\u8fc7\u4e00\u4e2a\u65b9\u6cd5\u6765\u8868\u793a\u653b\u51fb\n    public void attack(Role role){\n        \/\/\u9020\u6210\u4f24\u5bb3\u8fd9\u79cd\u6210\u968f\u673a\u503c\n        Random r = new Random();\n        int hurt = r.nextInt(30)+1;\n        \/\/\u5269\u4f59\u8840\u91cf\n        int remainblood = role.getBlood() - hurt;\n        \/\/\u5224\u65ad\u8840\u91cf\u662f\u5426\u4e3a0,\u907f\u514d\u51fa\u73b0&lt;0\u7684\u6570,\u4e0d\u5408\u903b\u8f91\n        remainblood = remainblood &lt; 0 ? 0 : remainblood;\n        \/\/\u8c03\u6574\u8840\u91cf\n        role.setBlood(remainblood);\n\n        System.out.println(this.getName() + \"\u6253\u4e86\"+ role.getName() +\"\u4e00\u62f3,\u7ed9\" +role.getName()+ \"\u9020\u6210\u4e86\" + hurt + \"\u70b9\u4f24\u5bb3,\" +\n                role.getName() + \"\u8fd8\u5269\u4f59\" +remainblood+ \"\u70b9\u8840\u91cf\");\n\n    }\n}<\/code><\/pre>\n<p>\n    \u6e38\u620f\u6d4b\u8bd5\u7684\u4ee3\u7801\n   <\/p>\n<pre><code class=\"language-java\">package Game;\n\npublic class GameTest {\n    public static void main(String[] args) {\n        Role r1 = new Role(\"\u9a6c\u5927\u5e08\",100);\n        Role r2 = new Role(\"\u5e74\u8f7b\u4eba\",100);\n        while(true){\n            r1.attack(r2);\n            if(r2.getBlood() == 0){\n                System.out.println(r1.getName()+\"K.O\u4e86\"+r2.getName());\n                System.out.println(r1.getName()+\"\uff1a\u5e74\u8f7b\u4eba,\u8fd8\u5f97\u591a\u7ec3\u7ec3\");\n                break;\n            }\n            r2.attack(r1);\n            if(r1.getBlood() == 0){\n                System.out.println(r2.getName()+\"K.O\u4e86\"+r1.getName());\n                System.out.println(r2.getName()+\": \u8fd9\u5df2\u7ecf\u662f\u5e74\u8f7b\u4eba\u7684\u5929\u4e0b\u4e86\");\n                System.out.println(r1.getName()+\": \u5e74\u8f7b\u4eba,\u4e0d\u8bb2\u6b66\u5fb7,\u641e\u5077\u88ad\");\n                break;\n            }\n\n        }\n\n    }\n\n}<\/code><\/pre>\n<p>\n    \u8fd0\u884c\u7ed3\u679c\u5c55\u793a:\n   <\/p>\n<\/blockquote>\n<blockquote>\n<h3 id=\"%C2%A0%E4%BA%8C.%E5%AF%B9%E8%B1%A1%E6%95%B0%E7%BB%84\">\n    \u4e8c.\u5bf9\u8c61\u6570\u7ec4<br \/>\n   <\/h3>\n<p>\n    \u521b\u5efa\u4e00\u4e2a\u5546\u54c1\u7c7b\n   <\/p>\n<pre><code class=\"language-java\">package Game;\n\npublic class Goods {\n    int id;\n    String name;\n    double price;\n    int cont;\n\n    public Goods() {\n    }\n\n    public Goods(int id, String name, double price, int cont) {\n        this.id = id;\n        this.name = name;\n        this.price = price;\n        this.cont = cont;\n    }\n}<\/code><\/pre>\n<pre><code class=\"language-java\">package Game;\n\npublic class GoodsTest {\n    public static void main(String[] args) {\n        \/\/\u521b\u5efa\u6570\u7ec4\u7528\u6765\u5b58\u50a83\u4e2a\u5bf9\u8c61\n        Goods[] arr = new Goods[3];\n\n        \/\/\u521b\u5efa3\u4e2a\u5bf9\u8c61\n        Goods g1 = new Goods(001, \"iqoo\", 3299.98, 300);\n        Goods g2 = new Goods(002, \"\u7ea2\u7c73\u8033\u673a\", 199.0, 500);\n        Goods g3 = new Goods(003, \"\u8054\u60f3\u5c0f\u65b0\", 5299.98, 100);\n        \/\/\u5c06\u5bf9\u8c61\u5b58\u8fdb\u6570\u7ec4\n        arr[0] = g1;\n        arr[1] = g2;\n        arr[2] = g3;\n        \/\/\u9a8c\u8bc1\u662f\u5426\u5b58\u50a8\u6210\u529f\n        \/\/\u904d\u5386\n        for (int i = 0; i &lt; arr.length; i++) {\n            System.out.println(\"id:\"+ arr[i].id+\" \u5546\u54c1\u540d\u79f0:\"+arr[i].name+\" \u5546\u54c1\u4ef7\u683c:\"+arr[i].price+\" \u5e93\u5b58:\"+arr[i].cont);\n        }\n\n    }\n}<\/code><\/pre>\n<\/p>\n<\/blockquote>\n<blockquote>\n<h3 id=\"%E4%B8%89.%E9%94%AE%E7%9B%98%E5%BD%95%E5%85%A5%E7%BB%83%E4%B9%A0\">\n    \u4e09.\u952e\u76d8\u5f55\u5165\u7ec3\u4e60<br \/>\n   <\/h3>\n<p>\n    1.\u57fa\u7840\u4e86\u89e3:\n   <\/p>\n<p>\n    nextInt();\u63a5\u6536\u6574\u6570\n   <\/p>\n<p>\n    nextDouble();\u63a5\u6536\u5c0f\u6570\n   <\/p>\n<p>\n    next();\u63a5\u6536\u5b57\u7b26\u4e32\n   <\/p>\n<p>\n    (\u9047\u5230\u7a7a\u683c,\u5236\u8868\u7b26(\\t),\u56de\u8f66\u5c31\u4e0d\u4f1a\u7ee7\u7eed\u63a5\u6536\u6570\u636e\u4e86)\n   <\/p>\n<p>\n    \u7ec3\u4e60\u5185\u5bb9:\u521b\u5efa\u4e09\u4e2a\u6c7d\u8f66\u5bf9\u8c61,\u6570\u636e\u901a\u8fc7\u952e\u76d8\u5f55\u5165,\u5e76\u628a\u6570\u636e\u5b58\u5165\u6570\u7ec4\u4e2d\n   <\/p>\n<p>\n    \u521b\u5efa\u6c7d\u8f66\u7c7b\u7684\u4ee3\u7801\n   <\/p>\n<pre><code class=\"language-java\">package Dome;\n\npublic class Car {\n    private String name;\n    private int price;\n    private String color;\n\n    public Car() {\n    }\n\n    public Car(String name, int price, String color) {\n        this.name = name;\n        this.price = price;\n        this.color = color;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public int getPrice() {\n        return price;\n    }\n\n    public void setPrice(int price) {\n        this.price = price;\n    }\n\n    public String getColor() {\n        return color;\n    }\n\n    public void setColor(String color) {\n        this.color = color;\n    }\n}<\/code><\/pre>\n<p>\n    \u68c0\u6d4b\u7684\u4ee3\u7801\n   <\/p>\n<pre><code class=\"language-java\">package Dome;\n\nimport java.util.Scanner;\n\npublic class CarTest {\n    public static void main(String[] args) {\n        \/\/\u521b\u5efa\u4e00\u4e2a\u6570\u7ec4\n        Car[] arr = new Car[3];\n        \/\/\n        Scanner s = new Scanner(System.in);\n        \/\/\u521b\u5efa\u4e09\u4e2a\u5bf9\u8c61\n        for (int i = 0; i &lt; arr.length; i++) {\n            Car c = new Car();\n            System.out.println(\"\u8bf7\u8f93\u5165\u6c7d\u8f66\u7684\u54c1\u724c\u540d\u79f0\");\n            String name = s.next();\n            c.setName(name);\n            System.out.println(\"\u8bf7\u8f93\u5165\u6c7d\u8f66\u7684\u4ef7\u683c\");\n            int price = s.nextInt();\n            c.setPrice(price);\n            System.out.println(\"\u8bf7\u8f93\u5165\u6c7d\u8f66\u7684\u989c\u8272\");\n            String color = s.next();\n            c.setColor(color);\n            \/\/\u5c06\u5bf9\u8c61\u5b58\u50a8\u5230\u6570\u7ec4\u4e2d\n            arr[i] = c;\n        }\n        \/\/\u904d\u5386\n        for (int i = 0; i &lt; arr.length; i++) {\n            System.out.println(\"\u6c7d\u8f66\u7684\u54c1\u724c\u662f:\"+arr[i].getName()+\" \u6c7d\u8f66\u7684\u4ef7\u683c\u662f:\"+arr[i].getPrice()+\n                    \" \u6c7d\u8f66\u7684\u989c\u8272\u662f:\"+arr[i].getColor());\n        }\n\n    }\n}<\/code><\/pre>\n<p>\n    \u7ed3\u679c\u5c55\u793a:\n   <\/p>\n<\/blockquote>\n<blockquote>\n<h3 id=\"%E5%9B%9B.%E5%A4%8D%E6%9D%82%E5%AF%B9%E8%B1%A1%E6%95%B0%E7%BB%84%E7%BB%83%E4%B9%A0\">\n    \u56db.\u590d\u6742\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60<br \/>\n   <\/h3>\n<h4 id=\"%E9%A2%98%E7%9B%AE%E8%A6%81%E6%B1%82%3A\">\n    \u9898\u76ee\u8981\u6c42:<br \/>\n   <\/h4>\n<p>\n    \u5b9a\u4e49\u4e00\u4e2a\u957f\u5ea6\u4e3a3\u7684\u6570\u7ec4\uff0c\u6570\u7ec4\u5b58\u50a81~3\u540d\u5b66\u751f\u5bf9\u8c61\u4f5c\u4e3a\u521d\u59cb\u6570\u636e\uff0c\u5b66\u751f\u5bf9\u8c61\u7684\u5b66\u53f7\uff0c\u59d3\u540d\u5404\u4e0d\u76f8\u540c.<br \/>\n    <br \/>\n    \u5b66\u751f\u7684\u5c5e\u6027:\u5b66\u53f7\uff0c\u59d3\u540d\uff0c\u5e74\u9f84\u3002<br \/>\n    <br \/>\n    \u8981\u6c421:\u518d\u6b21\u6dfb\u52a0\u4e00\u4e2a\u5b66\u751f\u5bf9\u8c61\uff0c\u5e76\u5728\u6dfb\u52a0\u7684\u65f6\u5019\u8fdb\u884c\u5b66\u53f7\u7684\u552f\u4e00\u6027\u5224\u65ad\u3002<br \/>\n    <br \/>\n    \u8981\u6c422:\u6dfb\u52a0\u5b8c\u6bd5\u4e4b\u540e\uff0c\u904d\u5386\u6240\u6709\u5b66\u751f\u4fe1\u606f\u3002<br \/>\n    <br \/>\n    \u8981\u6c423:\u901a\u8fc7id\u5220\u9664\u5b66\u751f\u4fe1\u606f<br \/>\n    <br \/>\n    \u5982\u679c\u5b58\u5728\uff0c\u5219\u5220\u9664\uff0c\u5982\u679c\u4e0d\u5b58\u5728\uff0c\u5219\u63d0\u793a\u5220\u9664\u5931\u8d25<br \/>\n    <br \/>\n    \u8981\u6c424:\u5220\u9664\u5b8c\u6bd5\u4e4b\u540e\uff0c\u904d\u5386\u6240\u6709\u5b66\u751f\u4fe1\u606f\u3002\u8981\u6c425:\u67e5\u8be2\u6570\u7ec4id\u4e3a\u201cheima002\u201d\u7684\u5b66\u751f\uff0c\u5982\u679c\u5b58\u5728\uff0c\u5219\u5c06\u4ed6\u7684\u5e74\u9f84+1\u5c81\n   <\/p>\n<\/blockquote><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55 \u4e00.\u6587\u5b57\u683c\u6597\u6e38\u620f \u4e8c.\u5bf9\u8c61\u6570\u7ec4 \u4e09.\u952e\u76d8\u5f55\u5165\u7ec3\u4e60 \u56db.\u590d\u6742\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60 \u9898\u76ee\u8981\u6c42: \u4e00.\u6587\u5b57\u683c\u6597\u6e38\u620f R [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":215,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[],"class_list":["post-493","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-32"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Java#9(\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60) - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java#9(\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60) - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u5f55 \u4e00.\u6587\u5b57\u683c\u6597\u6e38\u620f \u4e8c.\u5bf9\u8c61\u6570\u7ec4 \u4e09.\u952e\u76d8\u5f55\u5165\u7ec3\u4e60 \u56db.\u590d\u6742\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60 \u9898\u76ee\u8981\u6c42: \u4e00.\u6587\u5b57\u683c\u6597\u6e38\u620f R [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60\/\" \/>\n<meta property=\"og:site_name\" content=\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-03T16:00:14+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"260\" \/>\n\t<meta property=\"og:image:height\" content=\"180\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin@wunen\" \/>\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@wunen\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/\"},\"author\":{\"name\":\"admin@wunen\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\"},\"headline\":\"Java#9(\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60)\",\"datePublished\":\"2025-04-03T16:00:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/\"},\"wordCount\":9,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.wunen.com\/#organization\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"articleSection\":[\"\u5bf9\u6218\u683c\u6597\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/\",\"url\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/\",\"name\":\"Java#9(\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60) - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"isPartOf\":{\"@id\":\"https:\/\/www.wunen.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"datePublished\":\"2025-04-03T16:00:14+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#primaryimage\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"width\":260,\"height\":180},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wunen.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java#9(\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wunen.com\/#website\",\"url\":\"https:\/\/www.wunen.com\/\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"description\":\"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9\",\"publisher\":{\"@id\":\"https:\/\/www.wunen.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wunen.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.wunen.com\/#organization\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"url\":\"https:\/\/www.wunen.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"width\":1024,\"height\":1024,\"caption\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\"},\"image\":{\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\",\"name\":\"admin@wunen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"caption\":\"admin@wunen\"},\"sameAs\":[\"http:\/\/www.wunen.com\"],\"url\":\"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java#9(\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60) - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","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":"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60\/","og_locale":"zh_CN","og_type":"article","og_title":"Java#9(\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60) - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","og_description":"\u76ee\u5f55 \u4e00.\u6587\u5b57\u683c\u6597\u6e38\u620f \u4e8c.\u5bf9\u8c61\u6570\u7ec4 \u4e09.\u952e\u76d8\u5f55\u5165\u7ec3\u4e60 \u56db.\u590d\u6742\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60 \u9898\u76ee\u8981\u6c42: \u4e00.\u6587\u5b57\u683c\u6597\u6e38\u620f R [&hellip;]","og_url":"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60\/","og_site_name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","article_published_time":"2025-04-03T16:00:14+00:00","og_image":[{"width":260,"height":180,"url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","type":"image\/jpeg"}],"author":"admin@wunen","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin@wunen","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#article","isPartOf":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/"},"author":{"name":"admin@wunen","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8"},"headline":"Java#9(\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60)","datePublished":"2025-04-03T16:00:14+00:00","mainEntityOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/"},"wordCount":9,"commentCount":0,"publisher":{"@id":"https:\/\/www.wunen.com\/#organization"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","articleSection":["\u5bf9\u6218\u683c\u6597"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/","url":"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/","name":"Java#9(\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60) - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","isPartOf":{"@id":"https:\/\/www.wunen.com\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#primaryimage"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","datePublished":"2025-04-03T16:00:14+00:00","breadcrumb":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#primaryimage","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","width":260,"height":180},{"@type":"BreadcrumbList","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/04\/java9%e6%96%87%e5%ad%97%e6%a0%bc%e6%96%97%e6%b8%b8%e6%88%8f%e5%92%8c%e5%af%b9%e8%b1%a1%e6%95%b0%e7%bb%84%e7%bb%83%e4%b9%a0\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wunen.com\/"},{"@type":"ListItem","position":2,"name":"Java#9(\u6587\u5b57\u683c\u6597\u6e38\u620f\u548c\u5bf9\u8c61\u6570\u7ec4\u7ec3\u4e60)"}]},{"@type":"WebSite","@id":"https:\/\/www.wunen.com\/#website","url":"https:\/\/www.wunen.com\/","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","description":"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9","publisher":{"@id":"https:\/\/www.wunen.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wunen.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"https:\/\/www.wunen.com\/#organization","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","url":"https:\/\/www.wunen.com\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","width":1024,"height":1024,"caption":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51"},"image":{"@id":"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8","name":"admin@wunen","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","caption":"admin@wunen"},"sameAs":["http:\/\/www.wunen.com"],"url":"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/"}]}},"_links":{"self":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/comments?post=493"}],"version-history":[{"count":0,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/493\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media\/215"}],"wp:attachment":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media?parent=493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/categories?post=493"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/tags?post=493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}