{"id":511,"date":"2019-02-16T00:02:30","date_gmt":"2019-02-15T16:02:30","guid":{"rendered":"http:\/\/www.eait.co\/?p=511"},"modified":"2019-04-05T12:32:23","modified_gmt":"2019-04-05T04:32:23","slug":"java%e7%b1%bb-%e4%bb%8e%e5%ad%90%e7%b1%bb%e8%b0%83%e7%94%a8%e7%88%b6%e7%b1%bb%e6%96%b9%e6%b3%95%ef%bc%9a","status":"publish","type":"post","link":"https:\/\/notes.coremix.net\/?p=511","title":{"rendered":"java\u7c7b\u2014\u2014\u4ece\u5b50\u7c7b\u8c03\u7528\u7236\u7c7b\u65b9\u6cd5\uff1a"},"content":{"rendered":"<pre>\/**\r\n * Created by xabcd on 2019\/2\/15.\r\n *\/\r\n\r\n\r\n    class Person8\r\n    {\r\n        String name;\r\n        int age;\r\n        public String talk(){\r\n            return \"\u6211\u662f\uff1a\"+this.name+\"\uff0c\u4eca\u5e74\uff1a\"+this.age+\"\u5c81\";\r\n        }\r\n    }\r\n    class Studen extends Person8\r\n    {\r\n        String school;\r\n        public Studen(String name,int age,String school)\r\n        {\r\n            \/\/\u5206\u522b\u4e3a\u5c5e\u6027\u8d4b\u503c\r\n            this.name = name;\r\n            this.age = age;\r\n            this.school = school;\r\n        }\r\n        \/\/\u6b64\u5904\u8986\u5199Person8\u4e2d\u7684talk\uff08\uff09\u65b9\u6cd5\r\n        public String talk()\r\n        {\r\n            return super.talk()+\"\u6211\u5728\"+this.school + \"\u4e0a\u5b66\";\r\n        }\r\n    }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<\/pre>\n<pre>\/**\r\n * Created by xabcd on 2019\/2\/15.\r\n *\/\r\npublic class TestPerson8\r\n    {\r\n        public static void main(String args[]){\r\n        Studen ss = new Studen(\"\u5f20\u4e09\",25,\"\u5317\u4eac\");\r\n            \/\/\u6b64\u65f6\u8c03\u7528\u7684\u65f6\u5b50\u7c7b\u4e2d\u7684talk\uff08\uff09\u65b9\u6cd5\r\n        System.out.println(ss.talk());\r\n        System.out.println(ss.name);\r\n        System.out.println(ss.age);\r\n        System.out.println(ss.school);\r\n    }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\u6211\u662f\uff1a\u5f20\u4e09\uff0c\u4eca\u5e74\uff1a25\u5c81\u6211\u5728\u5317\u4eac\u4e0a\u5b66\r\n\u5f20\u4e09\r\n25\r\n\u5317\u4eac<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/** * Created by xabcd on 2019\/2\/15. *\/ class Person8 { [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,24],"tags":[],"class_list":["post-511","post","type-post","status-publish","format-standard","hentry","category-java","category-base_code"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/posts\/511","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=511"}],"version-history":[{"count":1,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/posts\/511\/revisions"}],"predecessor-version":[{"id":512,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/posts\/511\/revisions\/512"}],"wp:attachment":[{"href":"https:\/\/notes.coremix.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}