{"id":68,"date":"2018-03-26T11:52:41","date_gmt":"2018-03-26T03:52:41","guid":{"rendered":"http:\/\/dragonyue.fortiddns.com\/blog\/?p=68"},"modified":"2018-03-26T11:52:41","modified_gmt":"2018-03-26T03:52:41","slug":"java-2018-03-14-hw","status":"publish","type":"post","link":"https:\/\/dragonyue.fortiddns.com\/blog\/java-2018-03-14-hw\/","title":{"rendered":"Java 2018-03-14 HW"},"content":{"rendered":"<pre class=\"prettyprint linenums\">\r\nclass S45\r\n{\r\n\tint quan;\r\n\tString taste, temp;\r\n\r\n\tS45()\r\n\t{\r\n\t\tthis(1);\r\n\t\tSOP(\"AAA\");\r\n\t}\r\n\r\n\tS45(int a)\r\n\t{\r\n\t\tthis(1, \"\");\r\n\t\tSOP(\"BBB\");\r\n\t}\r\n\r\n\tS45(int a, String b)\r\n\t{\r\n\t\tSOP(\"CCC\");\r\n\t}\r\n\r\n\tpublic void buyjuice()\r\n\t{\r\n\t\tSOP(\"\u8981\u8cb7\u4ec0\u9ebc\u679c\u6c41\uff1a\");\r\n\t}\r\n\r\n\tpublic void buyjuice(String taste)\r\n\t{\r\n\t\tSOP(String.format(\"1\u676f%s\u6c41\", taste));\r\n\t}\r\n\r\n\tpublic void buyjuice(int quan, String taste)\r\n\t{\r\n\t\tSOP(String.format(\"%d\u676f%s\u6c41\", quan, taste));\r\n\t}\r\n\r\n\tpublic void buyjuice(String temp, String taste)\r\n\t{\r\n\t\tSOP(String.format(\"1\u676f%s\u7684%s\u6c41\", temp, taste));\r\n\t}\r\n\r\n\tpublic void buyjuice(int quan, String temp, String taste)\r\n\t{\r\n\t\tSOP(String.format(\"%d\u676f%s\u7684%s\u6c41\", quan, temp, taste));\r\n\t}\r\n\r\n\tprivate void SOP(String str)\r\n\t{\r\n\t\tSystem.out.println(str);\r\n\t}\r\n}\r\n\r\npublic class Java_107_03_14_HW1\r\n{\r\n\r\n\tpublic static void main(String[] args)\r\n\t{\r\n\t\t\/\/ TODO \u81ea\u52d5\u7522\u751f\u7684\u65b9\u6cd5 Stub\r\n\t\tS45 s45 = new S45();\r\n\t\ts45.buyjuice();\r\n\t\ts45.buyjuice(\"\u860b\u679c\");\r\n\t\ts45.buyjuice(2, \"\u860b\u679c\");\r\n\t\ts45.buyjuice(\"\u51b0\", \"\u860b\u679c\");\r\n\t\ts45.buyjuice(3, \"\u51b0\u7684\", \"\u860b\u679c\");\r\n\t}\r\n\r\n}\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>class S45 { int quan; String taste, temp; S45() { this( [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-java"],"_links":{"self":[{"href":"https:\/\/dragonyue.fortiddns.com\/blog\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dragonyue.fortiddns.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dragonyue.fortiddns.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dragonyue.fortiddns.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dragonyue.fortiddns.com\/blog\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":0,"href":"https:\/\/dragonyue.fortiddns.com\/blog\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"wp:attachment":[{"href":"https:\/\/dragonyue.fortiddns.com\/blog\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dragonyue.fortiddns.com\/blog\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dragonyue.fortiddns.com\/blog\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}