{"id":203118,"date":"2025-05-22T08:29:49","date_gmt":"2025-05-22T00:29:49","guid":{"rendered":"https:\/\/server.hk\/cnblog\/203118\/"},"modified":"2025-05-22T08:29:49","modified_gmt":"2025-05-22T00:29:49","slug":"%e7%94%a8-java-%e7%a0%b4%e8%a7%a3-oop%ef%bc%9a%e4%b8%80%e4%b8%aa%e4%bd%a0%e6%83%b3%e8%a6%81%e7%9a%84-pie","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/203118\/","title":{"rendered":"\u7528 Java \u7834\u89e3 OOP\uff1a\u4e00\u4e2a\u4f60\u60f3\u8981\u7684 PIE"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>\u7528 Java \u7834\u89e3 OOP\uff1a\u4e00\u4e2a\u4f60\u60f3\u8981\u7684 PIE<\/h1>\n<p><span style=\"cursor: pointer\"><i><\/i>\u6536\u85cf<\/span>    <\/p>\n<p>\u54c8\u55bd\uff01\u5927\u5bb6\u597d\uff0c\u5f88\u9ad8\u5174\u53c8\u89c1\u9762\u4e86\uff0c\u6211\u662f\u7684\u4e00\u540d\u4f5c\u8005\uff0c\u4eca\u5929\u7531\u6211\u7ed9\u5927\u5bb6\u5e26\u6765\u4e00\u7bc7<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300a\u7528 Java \u7834\u89e3 OOP\uff1a\u4e00\u4e2a\u4f60\u60f3\u8981\u7684 PIE\u300b<\/span>\uff0c\u672c\u6587\u4e3b\u8981\u4f1a\u8bb2\u5230<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5e0c\u671b\u5927\u5bb6\u4e00\u8d77\u5b66\u4e60\u8fdb\u6b65\uff0c\u4e5f\u6b22\u8fce\u5927\u5bb6\u5173\u6ce8\u3001\u70b9\u8d5e\u3001\u6536\u85cf\u3001\u8f6c\u53d1! \u4e0b\u9762\u5c31\u4e00\u8d77\u6765\u770b\u770b\u5427\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241028\/1730122337671f926189e06.jpg\" class=\"aligncenter\"><\/p>\n<p>\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8 java \u4e2d\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b (oop) \u7684<strong>\u56db\u4e2a\u57fa\u672c\u652f\u67f1<\/strong>\u3002\u8fd9\u4e9b\u6838\u5fc3\u539f\u5219\u6709\u52a9\u4e8e\u6784\u5efa\u6a21\u5757\u5316\u3001\u53ef\u91cd\u7528\u548c\u53ef\u7ef4\u62a4\u7684\u4ee3\u7801\u3002\u8fd9\u7bc7\u6587\u7ae0\u4f5c\u4e3a\u4ecb\u7ecd\uff0c\u5373\u5c06\u63a8\u51fa\u7684\u6761\u76ee\u5c06\u901a\u8fc7\u7ec6\u81f4\u5165\u5fae\u7684\u8ba8\u8bba\u548c\u793a\u4f8b\u6df1\u5165\u63a2\u8ba8\u6bcf\u4e2a\u6982\u5ff5\u3002 <\/p>\n<p>\u4e3a\u4e86\u4fbf\u4e8e\u8bb0\u5fc6\uff0c\u8bf7\u4f7f\u7528\u7f29\u5199\u8bcd<strong>\u201ca pie\u201d<\/strong>\uff1a<strong>a<\/strong>\u62bd\u8c61\uff0c<strong>p<\/strong>\u591a\u6001\uff0c<strong>i<\/strong>\u7ee7\u627f\uff0c\u4ee5\u53ca<strong>e<\/strong>\u5c01\u88c5\u3002 <\/p>\n<hr>\n<h3> \u9762\u5411\u5bf9\u8c61\u610f\u5473\u7740\u4ec0\u4e48\uff1f <\/h3>\n<p>java \u901a\u5e38\u88ab\u63cf\u8ff0\u4e3a<strong>\u9762\u5411\u5bf9\u8c61\u7684\u8bed\u8a00<\/strong>\uff0c\u4f46\u5b83\u5e76\u4e0d\u662f 100% \u9762\u5411\u5bf9\u8c61\u7684\u3002 <strong>\u4e3a\u4ec0\u4e48\uff1f<\/strong>\u867d\u7136 java \u4e2d\u7684\u5927\u591a\u6570\u5143\u7d20\u90fd\u56f4\u7ed5\u5bf9\u8c61\uff08\u5982\u7c7b\u3001\u5bf9\u8c61\u548c\u65b9\u6cd5\uff09\uff0c\u4f46\u5b83\u4e5f\u4f7f\u7528 <strong>\u539f\u59cb\u7c7b\u578b<\/strong>\uff08\u5982 int\u3001boolean \u548c double\uff09\uff0c\u5b83\u4eec\u662f <strong>\u4e0d\u662f\u7269\u4f53<\/strong>\u3002 <\/p>\n<p>\u5728 java \u4e2d\u4fdd\u7559\u539f\u59cb\u7c7b\u578b\u662f\u4e00\u4e2a\u7ecf\u8fc7\u6df1\u601d\u719f\u8651\u7684\u8bbe\u8ba1\u9009\u62e9\u3002\u539f\u56e0\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>\n<p><strong>\u5185\u5b58\u6548\u7387\uff1a<\/strong> \u4e0e\u5bf9\u5e94\u7684\u5bf9\u8c61\uff08\u5982 integer \u6216 boolean\uff09\u76f8\u6bd4\uff0c\u539f\u59cb\u7c7b\u578b\u5360\u7528 <strong>\u66f4\u5c11\u7684\u5185\u5b58<\/strong>\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u6027\u80fd\u63d0\u5347\uff1a<\/strong>\u57fa\u5143\u4e0a\u7684\u64cd\u4f5c<strong>\u66f4\u5feb<\/strong>\uff0c\u56e0\u4e3a\u5b83\u4eec\u907f\u514d\u4e86\u5bf9\u8c61\u521b\u5efa\u548c\u5f15\u7528\u7ba1\u7406\u7684\u5f00\u9500\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u65b9\u4fbf\uff1a<\/strong>\u539f\u59cb\u7c7b\u578b\u4f7f\u7b80\u5355\u60c5\u51b5\u4e0b\u7684\u4ee3\u7801\u66f4\u52a0\u7b80\u6d01\uff0c\u5c24\u5176\u662f\u5728\u5904\u7406<strong>\u7b97\u672f\u548c\u903b\u8f91\u8fd0\u7b97<\/strong>\u65f6\u3002 <\/p>\n<\/li>\n<\/ul>\n<p>\u7b80\u800c\u8a00\u4e4b\uff0c<strong>java \u901a\u8fc7\u63d0\u4f9b\u6027\u80fd\u548c\u5185\u5b58\u6548\u7387\u7684\u539f\u8bed\u6765\u5b9e\u73b0\u5e73\u8861<\/strong>\uff0c\u540c\u65f6\u8fd8\u63d0\u4f9b<strong>\u5305\u88c5\u7c7b<\/strong>\uff08\u5982 integer\uff09\uff0c\u4ee5\u4fbf\u60a8\u9700\u8981\u5c06\u8fd9\u4e9b\u503c\u89c6\u4e3a\u5bf9\u8c61\u65f6\u3002 <\/p>\n<hr>\n<h3> 1. <strong>\u62bd\u8c61\uff1a\u9690\u85cf\u4e0d\u5fc5\u8981\u7684\u7ec6\u8282<\/strong> <\/h3>\n<p>\u62bd\u8c61\u610f\u5473\u7740<strong>\u9690\u85cf\u5185\u90e8\u903b\u8f91\u5e76\u4ec5\u5411\u7528\u6237\u516c\u5f00\u57fa\u672c\u529f\u80fd<\/strong>\u3002\u5b83\u5141\u8bb8\u7528\u6237\u5728\u9ad8\u5c42\u4e0e\u5bf9\u8c61\u4ea4\u4e92\uff0c\u800c\u65e0\u9700\u62c5\u5fc3<strong>\u5e95\u5c42\u590d\u6742\u6027<\/strong>\u3002\u53ef\u4ee5\u5c06\u5176\u89c6\u4e3a\u4f7f\u7528<strong>atm<\/strong>\u2014\u2014\u60a8\u53ea\u9700\u8f93\u5165\u8981\u53d6\u6b3e\u7684\u91d1\u989d\uff0c\u800c\u4e0d\u9700\u8981\u77e5\u9053atm\u5982\u4f55\u4e0e\u60a8\u7684\u94f6\u884c\u4ea4\u4e92\u6765\u5904\u7406\u4ea4\u6613\u3002<\/p>\n<p>\u5728java\u4e2d\uff0c<strong>\u62bd\u8c61\u7c7b<\/strong>\u548c<strong>\u63a5\u53e3<\/strong>\u901a\u8fc7\u5b9a\u4e49<strong>\u57fa\u672c\u65b9\u6cd5<\/strong>\u5e76\u5c06\u5185\u90e8\u7ec6\u8282\u7559\u7ed9\u5b50\u7c7b\u6216\u7236\u7c7b\u6765\u5e2e\u52a9\u5b9e\u73b0\u62bd\u8c61\u4f46\u5bf9\u7528\u6237\u9690\u85cf\u3002 <\/p>\n<h4> \u4f8b\u5b50\uff1a <\/h4>\n<pre>abstract class payment {\n    \/\/ a method with concrete logic, hidden from the user.\n    private void authenticate() {\n        system.out.println(\"authenticating payment...\");\n    }\n\n    \/\/ abstract method that child classes must implement.\n    abstract void processpayment(double amount);\n\n    \/\/ public method exposing only the necessary details.\n    public void makepayment(double amount) {\n        authenticate();  \/\/ hidden complexity\n        processpayment(amount);  \/\/ exposed to child classes\n        system.out.println(\"payment completed.\");\n    }\n}\n\n\/\/ concrete class implementing the abstract method.\nclass creditcardpayment extends payment {\n    @override\n    void processpayment(double amount) {\n        system.out.println(\"processing credit card payment of \u20b9\" + amount);\n    }\n}\n\npublic class testabstraction {\n    public static void main(string[] args) {\n        payment payment = new creditcardpayment(); \/\/ polymorphism in action.\n        payment.makepayment(1000.00);  \/\/ only high-level interaction.\n    }\n}\n<\/pre>\n<h4> \u89e3\u91ca\uff1a <\/h4>\n<ul>\n<li>\n<p><strong>\u590d\u6742\u6027\u9690\u85cf\u5728\u54ea\u91cc\uff1f<\/strong> \u200b\u200b<\/p>\n<ul>\n<li>authenticate() \u65b9\u6cd5\u4ee3\u8868<strong>\u5185\u90e8\u903b\u8f91<\/strong>\uff08\u4f8b\u5982\uff0c\u7528\u6237\u9a8c\u8bc1\u3001\u52a0\u5bc6\uff09\uff0c\u5bf9\u4e8e\u5b50\u7c7b\u548c\u7528\u6237\u6765\u8bf4\u90fd\u662f<strong>\u79c1\u6709\u4e14\u9690\u85cf\u7684<\/strong>\u3002 <\/li>\n<li>makepayment() \u65b9\u6cd5\u662f<strong>\u552f\u4e00\u53ef\u4f9b\u7528\u6237\u4f7f\u7528\u7684\u516c\u5171\u65b9\u6cd5<\/strong>\uff0c\u63d0\u4f9b\u4e86\u4e00\u79cd\u4e0e\u652f\u4ed8\u7cfb\u7edf\u4ea4\u4e92\u7684\u7b80\u5355\u65b9\u6cd5\u3002 <\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u62bd\u8c61\u7c7b\u6709\u4ec0\u4e48\u5e2e\u52a9\uff1f<\/strong> \u200b\u200b<\/p>\n<ul>\n<li>\u5b83<strong>\u5f3a\u5236\u5b50\u7c7b<\/strong>\uff08\u5982creditcardpayment\uff09\u5b9e\u73b0<strong>\u6838\u5fc3\u903b\u8f91<\/strong>\uff08processpayment()\uff09\uff0c\u4f46\u5b50\u7c7b<strong>\u4e0d\u9700\u8981\u4e86\u89e3\u8eab\u4efd\u9a8c\u8bc1\u903b\u8f91<\/strong>\u2014\u2014\u5b83\u5728\u7236\u7c7b\u4e2d\u5904\u7406\u3002 <\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u7528\u6237\u770b\u5230\u4e86\u4ec0\u4e48\uff1f<\/strong> \u200b\u200b<\/p>\n<ul>\n<li>\u4ece\u7528\u6237\u7684\u89d2\u5ea6\u6765\u770b\uff0c\u4ed6\u4eec\u53ea\u4e0e makepayment() \u4ea4\u4e92\u2014\u2014\u4ed6\u4eec\u4e0d\u5173\u5fc3 <strong>\u8eab\u4efd\u9a8c\u8bc1<\/strong>\u6216<strong>\u4fe1\u7528\u5361\u4ed8\u6b3e\u5185\u90e8\u5982\u4f55\u5de5\u4f5c<\/strong>\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<hr>\n<h3> 2. <strong>\u591a\u6001\u6027\uff1a\u76f8\u540c\u7684\u52a8\u4f5c\uff0c\u4e0d\u540c\u7684\u5f62\u5f0f<\/strong> <\/h3>\n<p>\u591a\u6001\u5141\u8bb8<strong>\u5bf9\u8c61\u5728\u4e0d\u540c\u60c5\u51b5\u4e0b\u8868\u73b0\u4e0d\u540c\u3002<\/strong>java \u652f\u6301\u4e24\u79cd\u7c7b\u578b\u7684\u591a\u6001\uff1a<\/p>\n<p><strong>1\u3002\u7f16\u8bd1\u65f6\u591a\u6001\uff08\u65b9\u6cd5\u91cd\u8f7d\uff09\uff1a<\/strong>\u901a\u8fc7\u5b9a\u4e49\u591a\u4e2a\u540c\u540d\u4f46\u53c2\u6570\u4e0d\u540c\u7684\u65b9\u6cd5\u6765\u5b9e\u73b0\u3002<\/p>\n<h4> \u4f8b\u5b50\uff1a <\/h4>\n<pre>class calculator {\n    \/\/ compile-time polymorphism (overloading)\n    int add(int a, int b) {\n        return a + b;\n    }\n    int add(int a, int b, int c) {\n        return a + b + c;\n    }\n\n    public static void main(string[] args) {\n        calculator calc = new calculator();\n        system.out.println(calc.add(2, 3));  \/\/ output: 5\n        system.out.println(calc.add(2, 3, 4));  \/\/ output: 9\n    }\n}\n\n<\/pre>\n<p><strong>2\u3002\u8fd0\u884c\u65f6\u591a\u6001\u6027\uff08\u65b9\u6cd5\u91cd\u5199\uff09\uff1a<\/strong> \u5f53\u5b50\u7c7b\u63d0\u4f9b\u7236\u7c7b\u4e2d\u58f0\u660e\u7684\u65b9\u6cd5\u7684\u7279\u5b9a\u5b9e\u73b0\u65f6\u5b9e\u73b0\u3002 <\/p>\n<h4> \u4f8b\u5b50\uff1a <\/h4>\n<pre>class animal {\n    void sound() {\n        system.out.println(\"animals make sounds.\");\n    }\n}\n\nclass dog extends animal {\n    @override\n    void sound() {\n        system.out.println(\"dog barks.\");\n    }\n}\n\npublic class testpolymorphism {\n    public static void main(string[] args) {\n        animal animal = new dog();  \/\/ runtime polymorphism\n        animal.sound();  \/\/ output: dog barks\n    }\n}\n<\/pre>\n<h4> \u89e3\u91ca\uff1a <\/h4>\n<p><strong>\u7f16\u8bd1\u65f6\u591a\u6001\u6027<\/strong>\u901a\u8fc7\u91cd\u8f7dadd()\u65b9\u6cd5\u6765\u6f14\u793a\uff0c\u800c<strong>\u8fd0\u884c\u65f6\u591a\u6001\u6027<\/strong>\u901a\u8fc7\u91cd\u5199sound()\u65b9\u6cd5\u6765\u6f14\u793a\u3002<\/p>\n<p><strong>sound() \u65b9\u6cd5<\/strong> \u6839\u636e\u5bf9\u8c61\u7c7b\u578b\u7684\u4e0d\u540c\uff0c\u5176\u884c\u4e3a\u4e5f\u6709\u6240\u4e0d\u540c\u3002\u867d\u7136animal\u662fanimal\u7c7b\u578b\uff0c\u4f46\u5728<strong>\u8fd0\u884c\u65f6<\/strong>\uff0c\u4f1a\u6267\u884cdog\u4e2d\u91cd\u5199\u7684\u65b9\u6cd5\u3002<\/p>\n<hr>\n<h3> 3. <strong>\u7ee7\u627f\uff1a\u901a\u8fc7\u7236\u5b50\u5173\u7cfb\u5b9e\u73b0\u4ee3\u7801\u53ef\u91cd\u7528<\/strong> <\/h3>\n<p>\u7ee7\u627f\u5141\u8bb8<strong>\u7c7b\uff08\u5b50\uff09<\/strong>\u91cd\u7528\u53e6\u4e00\u4e2a<strong>\u7c7b\uff08\u7236\uff09<\/strong>\u7684\u5c5e\u6027\u548c\u884c\u4e3a\u3002\u8fd9\u53ef\u4ee5\u63d0\u9ad8<strong>\u4ee3\u7801\u53ef\u91cd\u7528\u6027<\/strong>\u5e76\u5728\u7c7b\u4e4b\u95f4\u5efa\u7acb<strong>is-a\u5173\u7cfb<\/strong>\u3002 java \u4e0d\u652f\u6301\u901a\u8fc7\u7c7b<strong>\u591a\u91cd\u7ee7\u627f<\/strong>\u4ee5\u907f\u514d\u6b67\u4e49\uff0c\u4f46\u5141\u8bb8\u901a\u8fc7\u63a5\u53e3\u5b9e\u73b0\u3002<\/p>\n<h4> \u4f8b\u5b50\uff1a <\/h4>\n<pre>class animal {\n    void eat() {\n        system.out.println(\"this animal eats food.\");\n    }\n}\n\nclass dog extends animal {\n    void bark() {\n        system.out.println(\"dog barks.\");\n    }\n}\n\npublic class testinheritance {\n    public static void main(string[] args) {\n        dog dog = new dog();\n        dog.eat();  \/\/ inherited method from animal\n        dog.bark(); \/\/ dog\u2019s own method\n    }\n}\n<\/pre>\n<h4> \u89e3\u91ca\uff1a <\/h4>\n<p>\u5728\u6b64\u793a\u4f8b\u4e2d\uff1a<\/p>\n<ul>\n<li>\n<p><strong>\u72d7\u7ee7\u627f\u81ea animal<\/strong>\uff0c\u8fd9\u610f\u5473\u7740\u72d7\u65e2\u80fd<strong>\u5403<\/strong>\u53c8<strong>\u5420<\/strong>\u3002<\/p>\n<\/li>\n<li>\n<p>\u8fd9\u6f14\u793a\u4e86<strong>\u4ee3\u7801\u91cd\u7528<\/strong>\u2014\u2014\u6211\u4eec\u4e0d\u9700\u8981\u91cd\u5199 dog \u7c7b\u7684 eat() \u65b9\u6cd5\u3002<\/p>\n<\/li>\n<\/ul>\n<hr>\n<h3> 4. <strong>\u5c01\u88c5\uff1a\u901a\u8fc7\u8bbf\u95ee\u63a7\u5236\u4fdd\u62a4\u6570\u636e<\/strong> <\/h3>\n<p>\u5c01\u88c5\u610f\u5473\u7740<strong>\u5c06\u6570\u636e\uff08\u5b57\u6bb5\uff09\u548c\u64cd\u4f5c\u5b83\u7684\u65b9\u6cd5\u6346\u7ed1\u5230\u4e00\u4e2a\u5355\u5143\uff08\u7c7b\uff09\u4e2d\u3002<\/strong>\u5b83\u8fd8\u901a\u8fc7\u5c06\u5b57\u6bb5\u8bbe\u4e3a\u79c1\u6709\u5e76\u516c\u5f00\u5b83\u4eec\u6765\u786e\u4fdd<strong>\u6570\u636e\u9690\u85cf<\/strong>\u901a\u8fc7 <strong>getter \u548c setter<\/strong>\u3002<\/p>\n<h4> \u4f8b\u5b50\uff1a <\/h4>\n<pre>class Student {\n    private String name;\n\n    \/\/ Getter\n    public String getName() {\n        return name;\n    }\n\n    \/\/ Setter\n    public void setName(String name) {\n        this.name = name;\n    }\n}\n\npublic class TestEncapsulation {\n    public static void main(String[] args) {\n        Student student = new Student();\n        student.setName(\"John\");  \/\/ Setting data through setter\n        \/\/ Accessing data through getter\n        System.out.println(student.getName());\n    }\n}\n<\/pre>\n<h4> \u89e3\u91ca\uff1a <\/h4>\n<ul>\n<li>\n<p><strong>\u540d\u79f0\u5b57\u6bb5<\/strong>\u662f\u79c1\u6709\u7684\uff0c\u8fd9\u610f\u5473\u7740\u4e0d\u80fd\u4ece\u7c7b\u5916\u90e8\u76f4\u63a5\u8bbf\u95ee\u5b83\u3002<\/p>\n<\/li>\n<li>\n<p>\u901a\u8fc7<strong>\u516c\u5171 getter \u548c setter<\/strong> \u63d0\u4f9b\u8bbf\u95ee\u6743\u9650\uff0c\u5f3a\u5236<strong>\u6570\u636e\u9690\u85cf<\/strong>\u3002<\/p>\n<\/li>\n<\/ul>\n<hr>\n<h3> \u7ed3\u8bba <\/h3>\n<p>java \u7684 <strong>oop \u539f\u5219<\/strong>\u2014<strong>\u62bd\u8c61\u3001\u591a\u6001\u3001\u7ee7\u627f\u548c\u5c01\u88c5<\/strong>\u2014\u6784\u6210\u4e86\u7f16\u5199\u6a21\u5757\u5316\u3001\u53ef\u7ef4\u62a4\u548c\u9ad8\u6548\u4ee3\u7801\u7684\u57fa\u7840\u3002\u638c\u63e1\u4e86\u8fd9\u4e9b\u6982\u5ff5\uff0c\u60a8\u5c06\u80fd\u591f\u66f4\u597d\u5730\u51c6\u5907\u8bbe\u8ba1\u548c\u7406\u89e3\u590d\u6742\u7684\u7cfb\u7edf\u3002 <\/p>\n<p>\u5728\u63a5\u4e0b\u6765\u7684\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u901a\u8fc7\u66f4\u7ec6\u81f4\u7684\u793a\u4f8b\u3001\u6700\u4f73\u5b9e\u8df5\u548c\u4ee5\u9762\u8bd5\u4e3a\u91cd\u70b9\u7684\u6280\u5de7\uff0c\u66f4\u6df1\u5165\u5730\u63a2\u8ba8\u8fd9\u4e9b\u539f\u5219\u3002\u656c\u8bf7\u5173\u6ce8\uff01 <\/p>\n<hr>\n<h2> \u76f8\u5173\u5e16\u5b50 <\/h2>\n<ul>\n<li>\n<p>java \u57fa\u7840<\/p>\n<\/li>\n<li>\n<p>\u6570\u7ec4\u9762\u8bd5\u8981\u70b9<\/p>\n<\/li>\n<li>\n<p>java \u5185\u5b58\u57fa\u7840<\/p>\n<\/li>\n<li>\n<p>java \u5173\u952e\u5b57\u8981\u70b9<\/p>\n<\/li>\n<li>\n<p>\u96c6\u5408\u6846\u67b6\u8981\u70b9<\/p>\n<\/li>\n<\/ul>\n<p>\u7f16\u7801\u5feb\u4e50\uff01<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u672c\u6587\u7684\u5168\u90e8\u5185\u5bb9\u4e86\uff0c\u662f\u5426\u6709\u987a\u5229\u5e2e\u52a9\u4f60\u89e3\u51b3\u95ee\u9898\uff1f\u82e5\u662f\u80fd\u7ed9\u4f60\u5e26\u6765\u5b66\u4e60\u4e0a\u7684\u5e2e\u52a9\uff0c\u8bf7\u5927\u5bb6\u591a\u591a\u652f\u6301\uff01\u66f4\u591a\u5173\u4e8e\u6587\u7ae0\u7684\u76f8\u5173\u77e5\u8bc6\uff0c\u4e5f\u53ef\u5173\u6ce8\u516c\u4f17\u53f7\u3002<\/p>\n<p>      \u7248\u672c\u58f0\u660e \u672c\u6587\u8f6c\u8f7d\u4e8e\uff1adev.to \u5982\u6709\u4fb5\u72af\uff0c\u8bf7\u8054\u7cfb\u5220\u9664<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7528 Java \u7834\u89e3 OOP\uff1a\u4e00\u4e2a&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-203118","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/203118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=203118"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/203118\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=203118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=203118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=203118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}