{"id":481,"date":"2019-02-14T23:41:55","date_gmt":"2019-02-14T15:41:55","guid":{"rendered":"http:\/\/www.eait.co\/?p=481"},"modified":"2019-04-05T12:32:24","modified_gmt":"2019-04-05T04:32:24","slug":"java-%e5%9c%a8%e7%b1%bb%e7%9a%84%e5%86%85%e9%83%a8%e8%b0%83%e7%94%a8%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/notes.coremix.net\/?p=481","title":{"rendered":"java \u5728\u7c7b\u7684\u5185\u90e8\u8c03\u7528\u65b9\u6cd5"},"content":{"rendered":"<pre>\/**\r\n * Created by xabcd on 2019\/2\/14.\r\n *\/\r\npublic class Person5\r\n{\r\n    private String name;\r\n    private int age;\r\n    private void talk()\r\n    {System.out.println(\"\u6211\u662f\uff1a\"+name+\"\uff0c\u4eca\u5e74\uff1a\"+age+\"\u5c81\");}\r\n    public void say()\r\n    {talk();}\r\n    public void setName(String str)\r\n    {name = str;}\r\n    public void setAge(int a)\r\n    {\r\n        if (a&gt;0)\r\n            age = a;\r\n    }\r\n    public String getName()\r\n    {\r\n        return name;\r\n    }\r\n    public int getAge()\r\n    {\r\n        return age;\r\n    }\r\n    public static void main(String args[])\r\n    {\r\n        \/\/\u58f0\u660e\u5e76\u5b9e\u4f8b\u5316\u4e00\u4e2aPerson5\u5bf9\u8c61p\r\n        Person5 p = new Person5();\r\n        p.setName(\"\u5f20\u4e09\");\r\n        p.setAge(30);\r\n        p.say();\r\n    }\r\n\r\n}\r\n\r\n\r\n\r\n\u7ed3\u679c\uff1a\r\n\u6211\u662f\uff1a\u5f20\u4e09\uff0c\u4eca\u5e74\uff1a30\u5c81<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/** * Created by xabcd on 2019\/2\/14. *\/ public class Pe [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,1],"tags":[],"class_list":["post-481","post","type-post","status-publish","format-standard","hentry","category-base_code","category-uncategorized"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/posts\/481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=481"}],"version-history":[{"count":1,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/posts\/481\/revisions"}],"predecessor-version":[{"id":482,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/posts\/481\/revisions\/482"}],"wp:attachment":[{"href":"https:\/\/notes.coremix.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}