{"id":455,"date":"2019-02-14T22:31:03","date_gmt":"2019-02-14T14:31:03","guid":{"rendered":"http:\/\/www.eait.co\/?p=455"},"modified":"2019-04-05T12:32:51","modified_gmt":"2019-04-05T04:32:51","slug":"java%e6%9e%84%e9%80%a0%e6%96%b9%e6%b3%95%e7%9a%84%e7%89%b9%e6%80%a7%ef%bc%9a","status":"publish","type":"post","link":"https:\/\/notes.coremix.net\/?p=455","title":{"rendered":"java\u6784\u9020\u65b9\u6cd5\u7684\u7279\u6027\uff1a"},"content":{"rendered":"<p>\u5728 Java \u7a0b\u5e8f \u91cc\uff0c \u6784\u9020 \u65b9\u6cd5 \u6240 \u5b8c\u6210 \u7684 \u4e3b\u8981 \u5de5\u4f5c \u662f \u5e2e\u52a9 \u65b0 \u521b\u5efa \u7684 \u5bf9\u8c61 \u8d4b \u521d\u503c\u3002 \u53ef\u5c06 \u6784\u9020 \u65b9\u6cd5 \u89c6\u4e3a \u4e00\u79cd \u7279\u6b8a \u7684 \u65b9\u6cd5\uff0c \u5b83\u7684 \u5b9a\u4e49 \u65b9\u5f0f \u4e0e \u666e\u901a \u65b9\u6cd5 \u7c7b\u4f3c\uff0c \u5176 \u8bed\u6cd5 \u5982\u4e0b\u3002<\/p>\n<p>\u5728\u4f7f \u7528 \u6784\u9020 \u65b9\u6cd5 \u7684 \u65f6\u5019 \u9700 \u6ce8\u610f \u4ee5\u4e0b \u4e24\u70b9\u3002 \u2474 \u5b83 \u5177\u6709 \u4e0e \u7c7b \u540d \u76f8\u540c \u7684 \u540d\u79f0\u3002 \u2475 \u5b83 \u6ca1\u6709 \u8fd4\u56de \u503c\u3002 \u6784\u9020 \u65b9\u6cd5 \u9664\u4e86 \u6ca1\u6709 \u8fd4\u56de \u503c\uff0c \u4e14 \u540d\u79f0 \u5fc5\u987b \u4e0e \u7c7b \u7684 \u540d\u79f0 \u76f8\u540c \u4e4b\u5916\uff0c \u5b83\u7684 \u8c03\u7528 \u65f6\u673a \u4e5f \u4e0e \u4e00\u822c \u7684 \u65b9\u6cd5 \u4e0d\u540c\u3002 \u4e00\u822c \u7684 \u65b9\u6cd5 \u662f\u5728 \u9700\u8981 \u65f6 \u624d \u8c03\u7528\uff0c \u800c \u6784\u9020 \u65b9\u6cd5 \u5219\u662f \u5728 \u521b\u5efa \u5bf9\u8c61 \u65f6 \u81ea\u52a8 \u8c03\u7528\uff0c \u5e76 \u6267\u884c \u6784\u9020 \u65b9\u6cd5 \u7684 \u5185\u5bb9\u3002 \u56e0\u6b64\uff0c \u6784\u9020 \u65b9\u6cd5 \u65e0\u9700 \u5728 \u7a0b\u5e8f \u4e2d\u76f4 \u63a5 \u8c03\u7528\uff0c \u800c\u662f \u5728 \u5bf9\u8c61 \u4ea7\u751f \u65f6 \u81ea\u52a8 \u6267\u884c\u3002 \u57fa\u4e8e \u4e0a\u8ff0 \u6784\u9020 \u65b9\u6cd5 \u7684 \u7279\u6027\uff0c \u53ef\u5229\u7528 \u5b83\u6765 \u5bf9 \u5bf9\u8c61 \u7684 \u6570\u636e \u6210\u5458 \u505a \u521d\u59cb\u5316 \u7684 \u8d4b\u503c\u3002 \u6240\u8c13 \u521d\u59cb\u5316 \u5c31\u662f \u4e3a \u5bf9\u8c61 \u8d4b \u521d\u503c\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<pre>\/**\r\n * Created by xabcd on 2019\/2\/14.\r\n *\/\r\npublic class Person2\r\n{\r\n    public Person2(){\r\n        System.out.println(\"public Person()\");\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\/14.\r\n *\/\r\npublic class TestPerson2\r\n{\r\n    public static void main(String[] args)\r\n    {\r\n        Person2 p = new Person2();<span style=\"color: #ff0000;\">\/\/\u6362\u6210new Person2\uff08\uff09\uff1b\u540c\u6837\u53ef\u7528<\/span>\r\n    }\r\n}\r\n\r\n\r\n\r\n\r\n\u7ed3\u679c\uff1a\r\npublic Person()\r\n\r\n\r\n\r\n\r\n\r\n\r\n<\/pre>\n<p>\u4ece\u6b64 \u7a0b\u5e8f \u4e2d \u8bfb\u8005 \u4e0d\u96be \u53d1\u73b0\uff0c \u5728 \u7c7b \u4e2d \u58f0\u660e \u7684 \u6784\u9020 \u65b9\u6cd5\uff0c \u4f1a\u5728 \u5b9e\u4f8b \u5316 \u5bf9\u8c61 \u65f6 \u81ea\u52a8 \u8c03\u7528\u3002 \u8bfb\u8005 \u53ef\u80fd \u4f1a \u95ee\uff0c \u5728 \u4e4b\u524d \u7684 \u7a0b\u5e8f \u4e2d\u7528 \u540c\u6837 \u7684 \u65b9\u6cd5 \u6765 \u4ea7\u751f \u5bf9\u8c61\uff0c \u4f46 \u662f\u5728 \u7c7b \u4e2d \u5e76\u6ca1\u6709 \u58f0\u660e \u4efb\u4f55 \u6784\u9020 \u65b9\u6cd5\uff0c \u800c \u7a0b\u5e8f \u4e0d \u4e5f \u4e00\u6837 \u53ef\u4ee5 \u6b63\u5e38 \u8fd0\u884c \u5417\uff1f \u5b9e\u9645\u4e0a\uff0c \u8bfb\u8005 \u5728 \u6267\u884c Javac \u7f16\u8bd1 Java \u7a0b\u5e8f \u7684 \u65f6\u5019\uff0c \u5982\u679c \u5728 \u7a0b\u5e8f \u4e2d \u6ca1\u6709 \u660e\u786e \u58f0\u660e \u4e00\u4e2a \u6784\u9020 \u65b9\u6cd5 \u7684 \u8bdd\uff0c \u7cfb\u7edf \u4f1a \u81ea\u52a8 \u4e3a \u7c7b \u52a0\u5165 \u4e00\u4e2a \u65e0 \u53c2 \u7684 \u4e14 \u4ec0\u4e48 \u90fd \u4e0d\u505a \u7684 \u6784\u9020 \u65b9\u6cd5\uff0c \u7c7b\u4f3c\u4e8e \u4e0b\u9762 \u4ee3\u7801\u3002 public Person() {} \u6240\u4ee5\uff0c \u4e4b\u524d \u6240 \u4f7f\u7528 \u7684 \u7a0b\u5e8f \u867d\u7136 \u6ca1\u6709 \u660e\u786e \u5730 \u58f0\u660e \u6784\u9020 \u65b9\u6cd5\uff0c \u4e5f\u662f \u53ef\u4ee5 \u6b63\u5e38 \u8fd0\u884c \u7684\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Java \u7a0b\u5e8f \u91cc\uff0c \u6784\u9020 \u65b9\u6cd5 \u6240 \u5b8c\u6210 \u7684 \u4e3b\u8981 \u5de5\u4f5c \u662f \u5e2e\u52a9 \u65b0 \u521b\u5efa \u7684 \u5bf9\u8c61 \u8d4b \u521d\u503c\u3002 \u53ef\u5c06 [&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-455","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\/455","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=455"}],"version-history":[{"count":4,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/posts\/455\/revisions"}],"predecessor-version":[{"id":459,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=\/wp\/v2\/posts\/455\/revisions\/459"}],"wp:attachment":[{"href":"https:\/\/notes.coremix.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.coremix.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}