{"id":3748,"date":"2024-02-22T09:01:02","date_gmt":"2024-02-22T01:01:02","guid":{"rendered":""},"modified":"2024-02-22T09:01:02","modified_gmt":"2024-02-22T01:01:02","slug":"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5","status":"publish","type":"post","link":"https:\/\/mushiming.com\/3748.html","title":{"rendered":"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5"},"content":{"rendered":"<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"display: none;\"> \n <path stroke-linecap=\"round\" d=\"M5,0 0,2.5 5,5z\" id=\"raphael-marker-block\" style=\"-webkit-tap-highlight-color: rgba(0, 0, 0, 0);\"><\/path> \n<\/svg> <\/p>\n<blockquote>\n<p>\u2728\u2728\u2728\u2728\u2728\u2728\u2728\u2728\u2728<strong>\u6bcf\u7bc7\u524d\u8a00<\/strong>\u2728\u2728\u2728\u2728\u2728\u2728\u2728\u2728\u2728<br \/> \u535a\u5ba2\u4e3b\u9875\uff1aAra~\u8ffd\u7740\u98ce\u8dd1<br \/> \u52b1\u5fd7\u8bed\u5f55\uff1a\ud83d\udc49\u52e4\u594b\u662f\u4f60\u751f\u547d\u7684\u5bc6\u7801\uff0c\u80fd\u8bd1\u51fa\u4f60\u4e00\u90e8\u58ee\u4e3d\u7684\u53f2\u8bd7\u3002\ud83d\udc48<br \/> \u6bcf\u65e5\u5ba3\u8a00\uff1a\u6bcf\u65e5\u770b\u4e66\u4e94\u5c0f\u65f6\uff0c\ud83d\udc49\u4e0d\u670d\u4ee3\u7801\u4e0d\u8d1f\u537f\u6765\u81ea\u5b89\u7136\u5927\u54e5\u8bed\u5f55\ud83d\udc48<br \/> Now\uff01\uff01Let\u2019s get it\uff01\uff01\uff01\uff01\u51b2\ud83d\udc31\u200d\ud83c\udfcd\ud83d\udc31\u200d\ud83c\udfcd\ud83d\udc31\u200d\ud83c\udfcd<br \/> <img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/e1d919e864db4736b0d51057a91c08a5.png\" =\"\" =\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" alt=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5 (https:\/\/mushiming.com\/)  \u7b2c1\u5f20\" title=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5  \u7b2c1\u5f20-\u7a46\u4e16\u660e\u535a\u5ba2\" ><\/p>\n<\/blockquote>\n<h2>\ud83d\udc49Java\u5165\u95e8\u4e4b - java\u57fa\u7840\u8bed\u6cd5\ud83d\udc48<\/h2>\n<h2>\ud83d\udc491. Java\u6982\u8ff0\ud83d\udc48<\/h2>\n<h4>1.1 Java\u8bed\u8a00\u53d1\u5c55\u53f2\uff08\u4e86\u89e3\uff09<\/h4>\n<blockquote>\n<p>\u8bed\u8a00\uff1a\u4eba\u4e0e\u4eba\u4ea4\u6d41\u6c9f\u901a\u7684\u8868\u8fbe\u65b9\u5f0f<\/p>\n<p>\u8ba1\u7b97\u673a\u8bed\u8a00\uff1a\u4eba\u4e0e\u8ba1\u7b97\u673a\u4e4b\u95f4\u8fdb\u884c\u4fe1\u606f\u4ea4\u6d41\u6c9f\u901a\u7684\u4e00\u79cd\u7279\u6b8a\u8bed\u8a00<\/p>\n<p>Java\u8bed\u8a00\u662f\u7f8e\u56fdSun\u516c\u53f8\uff08Stanford University Network\uff09\u57281995\u5e74\u63a8\u51fa\u7684\u8ba1\u7b97\u673a\u8bed\u8a00<\/p>\n<p>Java\u4e4b\u7236\uff1a\u8a79\u59c6\u65af\u00b7\u9ad8\u65af\u6797\uff08James Gosling\uff09<\/p>\n<p>2009\u5e74\uff0cSun\u516c\u53f8\u88ab\u7532\u9aa8\u6587\u516c\u53f8\u6536\u8d2d\uff0c\u6240\u4ee5\u6211\u4eec\u73b0\u5728\u8bbf\u95eeoracle\u5b98\u7f51\u5373\u53ef\uff1ahttps:\/\/www.oracle.com<\/p>\n<p>\u5f53\u524d\uff0c\u6211\u4eec\u8bfe\u7a0b\u4f7f\u7528\u7684JDK\u7248\u672c\uff1a11.0<\/p>\n<\/blockquote>\n<h4>1.2 Java\u8bed\u8a00\u8de8\u5e73\u53f0\u539f\u7406\uff08\u7406\u89e3\uff09<\/h4>\n<blockquote>\n<p>Java\u7a0b\u5e8f\u5e76\u975e\u662f\u76f4\u63a5\u8fd0\u884c\u7684\uff0cJava\u7f16\u8bd1\u5668\u5c06Java\u6e90\u7a0b\u5e8f\u7f16\u8bd1\u6210\u4e0e\u5e73\u53f0\u65e0\u5173\u7684\u5b57\u8282\u7801\u6587\u4ef6(class\u6587\u4ef6)\uff0c\u7136\u540e\u7531Java\u865a\u62df\u673a\uff08JVM\uff09\u5bf9\u5b57\u8282\u7801\u6587\u4ef6\u89e3\u91ca\u6267\u884c\u3002\u6240\u4ee5\u5728\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0b\uff0c\u53ea\u9700\u5b89\u88c5\u4e0d\u540c\u7684Java\u865a\u62df\u673a\u5373\u53ef\u5b9e\u73b0java\u7a0b\u5e8f\u7684\u8de8\u5e73\u53f0\u3002<\/p>\n<\/blockquote>\n<h4>1.3 JRE\u548cJDK\uff08\u8bb0\u5fc6\uff09<\/h4>\n<blockquote>\n<p>JVM\uff08Java Virtual Machine\uff09\uff0cJava\u865a\u62df\u673a<\/p>\n<p>JRE\uff08Java Runtime Environment\uff09\uff0cJava\u8fd0\u884c\u73af\u5883\uff0c\u5305\u542b\u4e86JVM\u548cJava\u7684\u6838\u5fc3\u7c7b\u5e93\uff08Java API\uff09<\/p>\n<p>JDK\uff08Java Development Kit\uff09\u79f0\u4e3aJava\u5f00\u53d1\u5de5\u5177\uff0c\u5305\u542b\u4e86JRE\u548c\u5f00\u53d1\u5de5\u5177<\/p>\n<p>\u603b\u7ed3\uff1a\u6211\u4eec\u53ea\u9700\u5b89\u88c5JDK\u5373\u53ef\uff0c\u5b83\u5305\u542b\u4e86java\u7684\u8fd0\u884c\u73af\u5883\u548c\u865a\u62df\u673a\u3002<\/p>\n<\/blockquote>\n<h4>1.4 JDK\u7684\u4e0b\u8f7d\u548c\u5b89\u88c5\uff08\u5e94\u7528\uff09<\/h4>\n<h5>1.4.1 \u4e0b\u8f7d<\/h5>\n<blockquote>\n<p>\u901a\u8fc7\u5b98\u65b9\u7f51\u7ad9\u83b7\u53d6JDK<\/p>\n<p>http:\/\/www.oracle.com<\/p>\n<p><strong>\u6ce8\u610f<\/strong>\uff1a\u9488\u5bf9\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u9700\u8981\u4e0b\u8f7d\u5bf9\u5e94\u7248\u672c\u7684JDK\u3002<\/p>\n<p>\u5177\u4f53\u4e0b\u8f7d\u6b65\u9aa4\u8bf7\u53c2\u89c1\u300aJDK\u4e0b\u8f7d\u53ca\u5b89\u88c5\u8bf4\u660e\u6587\u6863\u300b<\/p>\n<\/blockquote>\n<h5>1.4.2 \u5b89\u88c5<\/h5>\n<blockquote>\n<p>\u50bb\u74dc\u5f0f\u5b89\u88c5\uff0c\u4e0b\u4e00\u6b65\u5373\u53ef\u3002\u4f46\u9ed8\u8ba4\u7684\u5b89\u88c5\u8def\u5f84\u662f\u5728C:\\Program<br \/> Files\u4e0b\uff0c\u4e3a\u65b9\u4fbf\u7edf\u4e00\u7ba1\u7406\u5efa\u8bae\u4fee\u6539\u5b89\u88c5\u8def\u5f84\uff0c\u5c06\u4e0e\u5f00\u53d1\u76f8\u5173\u7684\u8f6f\u4ef6\u90fd\u5b89\u88c5\u5230\u4e00\u4e2a\u76ee\u5f55\u4e0b\uff0c\u4f8b\u5982\uff1aE:\\develop\u3002<\/p>\n<p><strong>\u6ce8\u610f<\/strong>\uff1a\u5b89\u88c5\u8def\u5f84\u4e0d\u8981\u5305\u542b\u4e2d\u6587\u6216\u8005\u7a7a\u683c\u7b49\u7279\u6b8a\u5b57\u7b26\uff08\u4f7f\u7528\u7eaf\u82f1\u6587\u76ee\u5f55\uff09\u3002<\/p>\n<p>\u5177\u4f53\u5b89\u88c5\u6b65\u9aa4\u8bf7\u53c2\u89c1\u300aJDK\u4e0b\u8f7d\u53ca\u5b89\u88c5\u8bf4\u660e\u6587\u6863\u300b<\/p>\n<\/blockquote>\n<h5>1.4.3 JDK\u7684\u5b89\u88c5\u76ee\u5f55\u4ecb\u7ecd<\/h5>\n<table>\n<thead>\n<tr>\n<th>\u76ee\u5f55\u540d\u79f0<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>bin<\/td>\n<td>\u8be5\u8def\u5f84\u4e0b\u5b58\u653e\u4e86JDK\u7684\u5404\u79cd\u5de5\u5177\u547d\u4ee4\u3002javac\u548cjava\u5c31\u653e\u5728\u8fd9\u4e2a\u76ee\u5f55\u3002<\/td>\n<\/tr>\n<tr>\n<td>conf<\/td>\n<td>\u8be5\u8def\u5f84\u4e0b\u5b58\u653e\u4e86JDK\u7684\u76f8\u5173\u914d\u7f6e\u6587\u4ef6\u3002<\/td>\n<\/tr>\n<tr>\n<td>include<\/td>\n<td>\u8be5\u8def\u5f84\u4e0b\u5b58\u653e\u4e86\u4e00\u4e9b\u5e73\u53f0\u7279\u5b9a\u7684\u5934\u6587\u4ef6\u3002<\/td>\n<\/tr>\n<tr>\n<td>jmods<\/td>\n<td>\u8be5\u8def\u5f84\u4e0b\u5b58\u653e\u4e86JDK\u7684\u5404\u79cd\u6a21\u5757\u3002<\/td>\n<\/tr>\n<tr>\n<td>legal<\/td>\n<td>\u8be5\u8def\u5f84\u4e0b\u5b58\u653e\u4e86JDK\u5404\u6a21\u5757\u7684\u6388\u6743\u6587\u6863\u3002<\/td>\n<\/tr>\n<tr>\n<td>lib<\/td>\n<td>\u8be5\u8def\u5f84\u4e0b\u5b58\u653e\u4e86JDK\u5de5\u5177\u7684\u4e00\u4e9b\u8865\u5145JAR\u5305\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\ud83d\udc492. \u5165\u95e8\u7a0b\u5e8fHelloWorld\ud83d\udc48<\/h2>\n<h4>2.1 \u5e38\u7528DOS\u547d\u4ee4\uff08\u5e94\u7528\uff09<\/h4>\n<blockquote>\n<p>\u5728\u63a5\u89e6\u96c6\u6210\u5f00\u53d1\u73af\u5883\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528\u547d\u4ee4\u884c\u7a97\u53e3\u5bf9java\u7a0b\u5e8f\u8fdb\u884c\u7f16\u8bd1\u548c\u8fd0\u884c\uff0c\u6240\u4ee5\u9700\u8981\u77e5\u9053\u4e00\u4e9b\u5e38\u7528DOS\u547d\u4ee4\u3002<\/p>\n<p>1\u3001\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\u7684\u65b9\u5f0f\uff1awin + r\u6253\u5f00\u8fd0\u884c\u7a97\u53e3\uff0c\u8f93\u5165cmd\uff0c\u56de\u8f66\u3002<\/p>\n<p>2\u3001\u5e38\u7528\u547d\u4ee4\u53ca\u5176\u4f5c\u7528<\/p>\n<\/blockquote>\n<table>\n<thead>\n<tr>\n<th>\u64cd\u4f5c<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u76d8\u7b26\u540d\u79f0:<\/td>\n<td>\u76d8\u7b26\u5207\u6362\u3002E:\u56de\u8f66\uff0c\u8868\u793a\u5207\u6362\u5230E\u76d8\u3002<\/td>\n<\/tr>\n<tr>\n<td>dir<\/td>\n<td>\u67e5\u770b\u5f53\u524d\u8def\u5f84\u4e0b\u7684\u5185\u5bb9\u3002<\/td>\n<\/tr>\n<tr>\n<td>cd \u76ee\u5f55<\/td>\n<td>\u8fdb\u5165\u5355\u7ea7\u76ee\u5f55\u3002cd itheima<\/td>\n<\/tr>\n<tr>\n<td>cd \u2026<\/td>\n<td>\u56de\u9000\u5230\u4e0a\u4e00\u7ea7\u76ee\u5f55\u3002<\/td>\n<\/tr>\n<tr>\n<td>cd \u76ee\u5f551\\\u76ee\u5f552\u2026<\/td>\n<td>\u8fdb\u5165\u591a\u7ea7\u76ee\u5f55\u3002cd itheima\\JavaSE<\/td>\n<\/tr>\n<tr>\n<td>cd \\<\/td>\n<td>\u56de\u9000\u5230\u76d8\u7b26\u76ee\u5f55\u3002<\/td>\n<\/tr>\n<tr>\n<td>cls<\/td>\n<td>\u6e05\u5c4f\u3002<\/td>\n<\/tr>\n<tr>\n<td>exit<\/td>\n<td>\u9000\u51fa\u547d\u4ee4\u63d0\u793a\u7b26\u7a97\u53e3\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>2.2 Path\u73af\u5883\u53d8\u91cf\u7684\u914d\u7f6e\uff08\u5e94\u7528\uff09<\/h4>\n<h5>2.2.1 \u4e3a\u4ec0\u4e48\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/h5>\n<blockquote>\n<p>\u5f00\u53d1Java\u7a0b\u5e8f\uff0c\u9700\u8981\u4f7f\u7528JDK\u63d0\u4f9b\u7684\u5f00\u53d1\u5de5\u5177\uff08\u6bd4\u5982javac.exe\u3001java.exe\u7b49\u547d\u4ee4\uff09\uff0c\u800c\u8fd9\u4e9b\u5de5\u5177\u5728JDK\u7684\u5b89\u88c5\u76ee\u5f55\u7684bin\u76ee\u5f55\u4e0b\uff0c\u5982\u679c\u4e0d\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u90a3\u4e48\u8fd9\u4e9b\u547d\u4ee4\u53ea\u53ef\u4ee5\u5728\u8be5\u76ee\u5f55\u4e0b\u6267\u884c\u3002\u6211\u4eec\u4e0d\u53ef\u80fd\u628a\u6240\u6709\u7684java\u6587\u4ef6\u90fd\u653e\u5230JDK\u7684bin\u76ee\u5f55\u4e0b\uff0c\u6240\u4ee5\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u7684\u4f5c\u7528\u5c31\u662f\u53ef\u4ee5\u4f7fbin\u76ee\u5f55\u4e0b\u7684java\u76f8\u5173\u547d\u4ee4\u53ef\u4ee5\u5728\u4efb\u610f\u76ee\u5f55\u4e0b\u4f7f\u7528\u3002<\/p>\n<p>\u6ce8\u610f\uff1a\u76ee\u524d\u8f83\u65b0\u7684JDK\u5b89\u88c5\u65f6\u4f1a\u81ea\u52a8\u914d\u7f6ejavac\u3001java\u547d\u4ee4\u7684\u8def\u5f84\u5230Path\u73af\u5883\u53d8\u91cf\u4e2d\u53bb \uff0c\u6240\u4ee5javac\u3001java\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u3002<\/p>\n<p>\u4f46\u662f\u4ee5\u524d\u4e0b\u8f7d\u7684\u8001\u7248\u672c\u7684JDK\u662f\u6ca1\u6709\u81ea\u52a8\u914d\u7f6e\u7684\uff0c\u6b64\u65f6\u5fc5\u9700\u8981\u81ea\u5df1\u914d\u7f6ePath\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<p>\u2460<strong>JAVA_HOME<\/strong>\uff1a\u544a\u8bc9\u64cd\u4f5c\u7cfb\u7edfJDK\u5b89\u88c5\u5728\u4e86\u54ea\u4e2a\u4f4d\u7f6e\uff08\u672a\u6765\u5176\u4ed6\u6280\u672f\u8981\u901a\u8fc7\u8fd9\u4e2a\u627eJDK\uff09<\/p>\n<p>\u2461<strong>Path<\/strong>\uff1a\u544a\u8bc9\u64cd\u4f5c\u7cfb\u7edfJDK\u63d0\u4f9b\u7684javac(\u7f16\u8bd1)\u3001java(\u6267\u884c)\u547d\u4ee4\u5b89\u88c5\u5230\u4e86\u54ea\u4e2a\u4f4d\u7f6e<\/p>\n<p><strong>\u6ce8\u610f\uff1a\u65b0\u7248\u672c\u7684JDK\u53ea\u662f\u81ea\u52a8\u914d\u7f6e\u4e86Path\uff0c\u6ca1\u6709\u81ea\u52a8\u914d\u7f6eJAVA_HOME\u3002<\/strong><\/p>\n<\/blockquote>\n<h4>2.3 HelloWorld\u6848\u4f8b\uff08\u5e94\u7528\uff09<\/h4>\n<blockquote>\n<p>HelloWorld\u6848\u4f8b\u662f\u6307\u5728\u8ba1\u7b97\u673a\u5c4f\u5e55\u4e0a\u8f93\u51fa\u201cHelloWorld\u201d\u8fd9\u884c\u6587\u5b57\u3002\u5404\u79cd\u8ba1\u7b97\u673a\u8bed\u8a00\u90fd\u4e60\u60ef\u4f7f\u7528\u8be5\u6848\u4f8b\u4f5c\u4e3a\u7b2c\u4e00\u4e2a\u6f14\u793a\u6848\u4f8b\u3002<\/p>\n<\/blockquote>\n<h5>2.3.1 Java\u7a0b\u5e8f\u5f00\u53d1\u8fd0\u884c\u6d41\u7a0b<\/h5>\n<blockquote>\n<p>\u5f00\u53d1Java\u7a0b\u5e8f\uff0c\u9700\u8981\u4e09\u4e2a\u6b65\u9aa4\uff1a\u7f16\u5199\u7a0b\u5e8f\uff0c\u7f16\u8bd1\u7a0b\u5e8f\uff0c\u8fd0\u884c\u7a0b\u5e8f\u3002<\/p>\n<\/blockquote>\n<h5>2.3.2 HelloWorld\u6848\u4f8b\u7684\u7f16\u5199<\/h5>\n<blockquote>\n<p>1\u3001\u65b0\u5efa\u6587\u672c\u6587\u6863\u6587\u4ef6\uff0c\u4fee\u6539\u540d\u79f0\u4e3aHelloWorld.java\u3002<\/p>\n<p>2\u3001\u7528\u8bb0\u4e8b\u672c\u6253\u5f00HelloWorld.java\u6587\u4ef6\uff0c\u8f93\u5199\u7a0b\u5e8f\u5185\u5bb9\u3002<\/p>\n<\/blockquote>\n<pre><code class=\"prism language-java\"><span class=\"token keyword\">public<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">HelloWorld<\/span> <span class=\"token punctuation\">{ \n   <!-- --><\/span>\n\t<span class=\"token keyword\">public<\/span> <span class=\"token keyword\">static<\/span> <span class=\"token keyword\">void<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span>String<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span> args<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{ \n   <!-- --><\/span>\n\t\tSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"HelloWorld\"<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n\t<span class=\"token punctuation\">}<\/span>\n<span class=\"token punctuation\">}<\/span>\n<\/code><\/pre>\n<h5>2.3.3 HelloWorld\u6848\u4f8b\u7684\u7f16\u8bd1\u548c\u8fd0\u884c<\/h5>\n<p>\u5b58\u6587\u4ef6\uff0c\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\uff0c\u5c06\u76ee\u5f55\u5207\u6362\u81f3java\u6587\u4ef6\u6240\u5728\u76ee\u5f55\uff0c\u7f16\u8bd1java\u6587\u4ef6\u751f\u6210class\u6587\u4ef6\uff0c\u8fd0\u884cclass\u6587\u4ef6\u3002<\/p>\n<blockquote>\n<p>\u7f16\u8bd1\uff1ajavac \u6587\u4ef6\u540d.java<\/p>\n<p>\u8303\u4f8b\uff1ajavac HelloWorld.java<\/p>\n<p>\u6267\u884c\uff1ajava \u7c7b\u540d<\/p>\n<p>\u8303\u4f8b\uff1ajava HelloWorld<\/p>\n<\/blockquote>\n<h4>2.4 HelloWorld\u6848\u4f8b\u5e38\u89c1\u95ee\u9898\uff08\u7406\u89e3\uff09<\/h4>\n<h5>2.4.1 BUG<\/h5>\n<blockquote>\n<p>\u5728\u7535\u8111\u7cfb\u7edf\u6216\u7a0b\u5e8f\u4e2d\uff0c\u9690\u85cf\u7740\u7684\u4e00\u4e9b\u672a\u88ab\u53d1\u73b0\u7684\u7f3a\u9677\u6216\u95ee\u9898\u7edf\u79f0\u4e3abug\uff08\u6f0f\u6d1e\uff09\u3002<\/p>\n<\/blockquote>\n<h5>2.4.2 BUG\u7684\u89e3\u51b3<\/h5>\n<blockquote>\n<p>1\u3001\u5177\u5907\u8bc6\u522bBUG\u7684\u80fd\u529b\uff1a\u591a\u770b<\/p>\n<p>2\u3001\u5177\u5907\u5206\u6790BUG\u7684\u80fd\u529b\uff1a\u591a\u601d\u8003\uff0c\u591a\u67e5\u8d44\u6599<\/p>\n<p>3\u3001\u5177\u5907\u89e3\u51b3BUG\u7684\u80fd\u529b\uff1a\u591a\u5c1d\u8bd5\uff0c\u591a\u603b\u7ed3<\/p>\n<\/blockquote>\n<h5>2.4.3 HelloWorld\u6848\u4f8b\u5e38\u89c1\u95ee\u9898<\/h5>\n<blockquote>\n<p>1\u3001\u975e\u6cd5\u5b57\u7b26\u95ee\u9898\u3002Java\u4e2d\u7684\u7b26\u53f7\u90fd\u662f\u82f1\u6587\u683c\u5f0f\u7684\u3002<\/p>\n<p>2\u3001\u5927\u5c0f\u5199\u95ee\u9898\u3002Java\u8bed\u8a00\u5bf9\u5927\u5c0f\u5199\u654f\u611f\uff08\u533a\u5206\u5927\u5c0f\u5199\uff09\u3002<\/p>\n<p>3\u3001\u5728\u7cfb\u7edf\u4e2d\u663e\u793a\u6587\u4ef6\u7684\u6269\u5c55\u540d\uff0c\u907f\u514d\u51fa\u73b0HelloWorld.java.txt\u6587\u4ef6\u3002<\/p>\n<p>4\u3001\u7f16\u8bd1\u547d\u4ee4\u540e\u7684java\u6587\u4ef6\u540d\u9700\u8981\u5e26\u6587\u4ef6\u540e\u7f00.java<\/p>\n<p>5\u3001\u8fd0\u884c\u547d\u4ee4\u540e\u7684class\u6587\u4ef6\u540d\uff08\u7c7b\u540d\uff09\u4e0d\u5e26\u6587\u4ef6\u540e\u7f00.class<\/p>\n<\/blockquote>\n<h2>\ud83d\udc493\u3001IDEA\u5b89\u88c5\u4f7f\u7528\ud83d\udc48<\/h2>\n<p>\u53c2\u89c1**\u201cIDEA\u5b89\u88c5\u8be6\u89e3\u201d**<br \/> \u8fd9\u91cc\u8fd9\u91cc<br \/>\n <idea\u5b89\u88c5\u8be6\u89e3><\/idea\u5b89\u88c5\u8be6\u89e3><\/p>\n<h2>\ud83d\udc494. java\u57fa\u7840\u8bed\u6cd5\ud83d\udc48<\/h2>\n<h5>4.1 \u6ce8\u91ca\uff08\u7406\u89e3\uff09<\/h5>\n<blockquote>\n<p>\u6ce8\u91ca\u662f\u5bf9\u4ee3\u7801\u7684\u89e3\u91ca\u548c\u8bf4\u660e\u6587\u5b57\uff0c\u53ef\u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u53ef\u8bfb\u6027\uff0c\u56e0\u6b64\u5728\u7a0b\u5e8f\u4e2d\u6dfb\u52a0\u5fc5\u8981\u7684\u6ce8\u91ca\u6587\u5b57\u5341\u5206\u91cd\u8981\u3002Java\u4e2d\u7684\u6ce8\u91ca\u5206\u4e3a\u4e09\u79cd\uff1a<\/p>\n<p>\u5355\u884c\u6ce8\u91ca\u3002\u5355\u884c\u6ce8\u91ca\u7684\u683c\u5f0f\u662f\u4f7f\u7528\/\/\uff0c\u4ece\/\/\u5f00\u59cb\u81f3\u672c\u884c\u7ed3\u5c3e\u7684\u6587\u5b57\u5c06\u4f5c\u4e3a\u6ce8\u91ca\u6587\u5b57\u3002<\/p>\n<\/blockquote>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token comment\">\/\/ \u8fd9\u662f\u5355\u884c\u6ce8\u91ca\u6587\u5b57<\/span>\n<\/code><\/pre>\n<blockquote>\n<p>\u591a\u884c\u6ce8\u91ca\u3002\u591a\u884c\u6ce8\u91ca\u7684\u683c\u5f0f\u662f\u4f7f\u7528\/* \u548c *\/\u5c06\u4e00\u6bb5\u8f83\u957f\u7684\u6ce8\u91ca\u62ec\u8d77\u6765\u3002<\/p>\n<\/blockquote>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token comment\">\/* \u8fd9\u662f\u591a\u884c\u6ce8\u91ca\u6587\u5b57 \u8fd9\u662f\u591a\u884c\u6ce8\u91ca\u6587\u5b57 \u8fd9\u662f\u591a\u884c\u6ce8\u91ca\u6587\u5b57 *\/<\/span>\n\u6ce8\u610f\uff1a\u591a\u884c\u6ce8\u91ca\u4e0d\u80fd\u5d4c\u5957\u4f7f\u7528\u3002\n<\/code><\/pre>\n<blockquote>\n<p>\u6587\u6863\u6ce8\u91ca\u3002\u6587\u6863\u6ce8\u91ca\u4ee5<code>\/**<\/code>\u5f00\u59cb\uff0c\u4ee5<code>*\/<\/code>\u7ed3\u675f\u3002\uff08\u4ee5\u540e\u8bb2\uff09<\/p>\n<\/blockquote>\n<h5>4.2 \u5b57\u9762\u91cf\uff08\u5e94\u7528\uff09<\/h5>\n<blockquote>\n<p><code>\u4f5c\u7528\uff1a\u544a\u8bc9\u7a0b\u5e8f\u5458\uff0c\u6570\u636e\u5728\u7a0b\u5e8f\u4e2d\u7684\u4e66\u5199\u683c\u5f0f\u3002<\/code><\/p>\n<\/blockquote>\n<table>\n<thead>\n<tr>\n<th><strong>\u5b57\u9762\u91cf\u7c7b\u578b<\/strong><\/th>\n<th><strong>\u8bf4\u660e<\/strong><\/th>\n<th><strong>\u7a0b\u5e8f\u4e2d\u7684\u5199\u6cd5<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u6574\u6570<\/td>\n<td>\u4e0d\u5e26\u5c0f\u6570\u7684\u6570\u5b57<\/td>\n<td>666\uff0c-88<\/td>\n<\/tr>\n<tr>\n<td>\u5c0f\u6570<\/td>\n<td>\u5e26\u5c0f\u6570\u7684\u6570\u5b57<\/td>\n<td>13.14\uff0c-5.21<\/td>\n<\/tr>\n<tr>\n<td>\u5b57\u7b26<\/td>\n<td>\u5fc5\u987b\u4f7f\u7528\u5355\u5f15\u53f7\uff0c\u6709\u4e14\u4ec5\u80fd\u4e00\u4e2a\u5b57\u7b26<\/td>\n<td>\u2018A\u2019\uff0c\u20180\u2019\uff0c \u2018\u6211\u2019<\/td>\n<\/tr>\n<tr>\n<td>\u5b57\u7b26\u4e32<\/td>\n<td>\u5fc5\u987b\u4f7f\u7528\u53cc\u5f15\u53f7\uff0c\u5185\u5bb9\u53ef\u6709\u53ef\u65e0<\/td>\n<td>\u201cHelloWorld\u201d\uff0c\u201c\u9ed1\u9a6c\u7a0b\u5e8f\u5458\u201d<\/td>\n<\/tr>\n<tr>\n<td>\u5e03\u5c14\u503c<\/td>\n<td>\u5e03\u5c14\u503c\uff0c\u8868\u793a\u771f\u5047\uff0c\u53ea\u6709\u4e24\u4e2a\u503c\uff1atrue\uff0cfalse<\/td>\n<td>true \u3001false<\/td>\n<\/tr>\n<tr>\n<td>\u7a7a\u503c<\/td>\n<td>\u4e00\u4e2a\u7279\u6b8a\u7684\u503c\uff0c\u7a7a\u503c<\/td>\n<td>\u503c\u662f\uff1anull<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre><code class=\"prism language-java\"><span class=\"token keyword\">public<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">Demo<\/span> <span class=\"token punctuation\">{ \n   <!-- --><\/span>\n    <span class=\"token keyword\">public<\/span> <span class=\"token keyword\">static<\/span> <span class=\"token keyword\">void<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span>String<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span> args<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{ \n   <!-- --><\/span>\n        System<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">10<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa\u4e00\u4e2a\u6574\u6570<\/span>\n        System<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">5.5<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa\u4e00\u4e2a\u5c0f\u6570<\/span>\n        System<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">'a'<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa\u4e00\u4e2a\u5b57\u7b26<\/span>\n        System<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token boolean\">true<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51faboolean\u503ctrue<\/span>\n        System<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"\u6b22\u8fce\u6765\u5230\u9ed1\u9a6c\u7a0b\u5e8f\u5458\"<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa\u5b57\u7b26\u4e32<\/span>\n    <span class=\"token punctuation\">}<\/span>\n<span class=\"token punctuation\">}<\/span>\n<\/code><\/pre>\n<h5>4.3 \u6570\u636e\u7c7b\u578b\uff08\u8bb0\u5fc6\u3001\u5e94\u7528\uff09<\/h5>\n<h6>3.4.1 \u8ba1\u7b97\u673a\u5b58\u50a8\u5355\u5143<\/h6>\n<blockquote>\n<p>l\u8ba1\u7b97\u673a\u5e95\u5c42\u90fd\u662f\u4e00\u4e9b\u6570\u5b57\u7535\u8def(\u7406\u89e3\u6210\u5f00\u5173)\uff0c\u7528\u5f00\u8868\u793a0\u3001\u5173\u8868\u793a1\uff0c\u8fd9\u4e9b01\u7684\u5f62\u5f0f\u5c31\u662f\u4e8c\u8fdb\u5236\u3002<\/p>\n<p>\u6570\u636e\u5728\u8ba1\u7b97\u673a\u5e95\u5c42\u90fd\u662f\u91c7\u7528\u4e8c\u8fdb\u5236\u5b58\u50a8\u7684\uff0cl\u5728\u8ba1\u7b97\u673a\u4e2d\u8ba4\u4e3a\u4e00\u4e2a\u5f00\u5173\u8868\u793a\u76840|1\u79f0\u4e3a1\u4f4d\uff08b\uff09\uff0c\u6bcf8\u4f4d\u79f0\u4e3a\u4e00\u4e2a\u5b57\u8282\uff08B\uff09\uff0c \u6240\u4ee51B=8b<\/p>\n<p>\u5b57\u8282\u662f\u8ba1\u7b97\u673a\u4e2d\u6570\u636e\u7684\u6700\u5c0f\u5355\u4f4d\u3002<\/p>\n<p>\u6211\u4eec\u77e5\u9053\u8ba1\u7b97\u673a\u662f\u53ef\u4ee5\u7528\u6765\u5b58\u50a8\u6570\u636e\u7684\uff0c\u4f46\u662f\u65e0\u8bba\u662f\u5185\u5b58\u8fd8\u662f\u786c\u76d8\uff0c\u8ba1\u7b97\u673a\u5b58\u50a8\u8bbe\u5907\u7684\u6700\u5c0f\u4fe1\u606f\u5355\u5143\u53eb\u201c\u4f4d\uff08bit\uff09\u201d\uff0c\u6211\u4eec\u53c8\u79f0\u4e4b\u4e3a\u201c\u6bd4\u7279\u4f4d\u201d\uff0c\u901a\u5e38\u7528\u5c0f\u5199\u7684\u5b57\u6bcd\u201db\u201d\u8868\u793a\u3002\u800c\u8ba1\u7b97\u673a\u4e2d\u6700\u57fa\u672c\u7684\u5b58\u50a8\u5355\u5143\u53eb\u201c\u5b57\u8282\uff08byte\uff09\u201d\uff0c<\/p>\n<p>\u901a\u5e38\u7528\u5927\u5199\u5b57\u6bcd\u201dB\u201d\u8868\u793a\uff0c\u5b57\u8282\u662f\u7531\u8fde\u7eed\u76848\u4e2a\u4f4d\u7ec4\u6210\u3002<\/p>\n<p>\u9664\u4e86\u5b57\u8282\u5916\u8fd8\u6709\u4e00\u4e9b\u5e38\u7528\u7684\u5b58\u50a8\u5355\u4f4d\uff0c\u5176\u6362\u7b97\u5355\u4f4d\u5982\u4e0b\uff1a<\/p>\n<p>1B\uff08\u5b57\u8282\uff09 = 8bit<\/p>\n<p>1KB = 1024B<\/p>\n<p>1MB = 1024KB<\/p>\n<p>1GB = 1024MB<\/p>\n<p>1TB = 1024GB<\/p>\n<\/blockquote>\n<h6>3.4.2 Java\u4e2d\u7684\u6570\u636e\u7c7b\u578b<\/h6>\n<blockquote>\n<p>Java\u662f\u4e00\u4e2a\u5f3a\u7c7b\u578b\u8bed\u8a00\uff0cJava\u4e2d\u7684\u6570\u636e\u5fc5\u987b\u660e\u786e\u6570\u636e\u7c7b\u578b\u3002\u5728Java\u4e2d\u7684\u6570\u636e\u7c7b\u578b\u5305\u62ec\u57fa\u672c\u6570\u636e\u7c7b\u578b\u548c\u5f15\u7528\u6570\u636e\u7c7b\u578b\u4e24\u79cd\u3002<\/p>\n<\/blockquote>\n<p>Java\u4e2d\u7684\u57fa\u672c\u6570\u636e\u7c7b\u578b\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th align=\"center\">\u6570\u636e\u7c7b\u578b<\/th>\n<th align=\"center\">\u5173\u952e\u5b57<\/th>\n<th align=\"center\">\u5185\u5b58\u5360\u7528<\/th>\n<th align=\"center\">\u53d6\u503c\u8303\u56f4<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"center\">\u6574\u6570<\/td>\n<td align=\"center\">byte<\/td>\n<td align=\"center\">1<\/td>\n<td align=\"center\">\u8d1f\u76842\u76847\u6b21\u65b9 ~ 2\u76847\u6b21\u65b9-1(-128~127)<\/td>\n<\/tr>\n<tr>\n<td align=\"center\"><\/td>\n<td align=\"center\">short<\/td>\n<td align=\"center\">2<\/td>\n<td align=\"center\">\u8d1f\u76842\u768415\u6b21\u65b9 ~ 2\u768415\u6b21\u65b9-1(-32768~32767)<\/td>\n<\/tr>\n<tr>\n<td align=\"center\"><\/td>\n<td align=\"center\">int<\/td>\n<td align=\"center\">4<\/td>\n<td align=\"center\">\u8d1f\u76842\u768431\u6b21\u65b9 ~ 2\u768431\u6b21\u65b9-1<\/td>\n<\/tr>\n<tr>\n<td align=\"center\"><\/td>\n<td align=\"center\">long<\/td>\n<td align=\"center\">8<\/td>\n<td align=\"center\">\u8d1f\u76842\u768463\u6b21\u65b9 ~ 2\u768463\u6b21\u65b9-1<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">\u6d6e\u70b9\u6570<\/td>\n<td align=\"center\">float<\/td>\n<td align=\"center\">4<\/td>\n<td align=\"center\">1.401298e-45 ~ 3.402823e+38<\/td>\n<\/tr>\n<tr>\n<td align=\"center\"><\/td>\n<td align=\"center\">double<\/td>\n<td align=\"center\">8<\/td>\n<td align=\"center\">4.9000000e-324 ~ 1.797693e+308<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">\u5b57\u7b26<\/td>\n<td align=\"center\">char<\/td>\n<td align=\"center\">2<\/td>\n<td align=\"center\">0-65535<\/td>\n<\/tr>\n<tr>\n<td align=\"center\">\u5e03\u5c14<\/td>\n<td align=\"center\">boolean<\/td>\n<td align=\"center\">1<\/td>\n<td align=\"center\">true\uff0cfalse<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote>\n<p>\u8bf4\u660e\uff1a<\/p>\n<p>\u200b e+38\u8868\u793a\u662f\u4e58\u4ee510\u768438\u6b21\u65b9\uff0c\u540c\u6837\uff0ce-45\u8868\u793a\u4e58\u4ee510\u7684\u8d1f45\u6b21\u65b9\u3002<\/p>\n<p>\u200b \u5728java\u4e2d\u6574\u6570\u9ed8\u8ba4\u662fint\u7c7b\u578b\uff0c\u6d6e\u70b9\u6570\u9ed8\u8ba4\u662fdouble\u7c7b\u578b\u3002<\/p>\n<\/blockquote>\n<h5>4.4 \u53d8\u91cf\uff08\u5e94\u7528\uff09<\/h5>\n<h6>3.5.1 \u53d8\u91cf\u7684\u5b9a\u4e49<\/h6>\n<blockquote>\n<p>\u53d8\u91cf\uff1a\u5728\u7a0b\u5e8f\u8fd0\u884c\u8fc7\u7a0b\u4e2d\uff0c\u5176\u503c\u53ef\u4ee5\u53d1\u751f\u6539\u53d8\u7684\u91cf\u3002<\/p>\n<p>\u4ece\u672c\u8d28\u4e0a\u8bb2\uff0c\u53d8\u91cf\u662f\u5185\u5b58\u4e2d\u7684\u4e00\u5c0f\u5757\u533a\u57df\uff0c\u5176\u503c\u53ef\u4ee5\u5728\u4e00\u5b9a\u8303\u56f4\u5185\u53d8\u5316\u3002<\/p>\n<p>\u53d8\u91cf\u7684\u5b9a\u4e49\u683c\u5f0f\uff1a<\/p>\n<\/blockquote>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\">\u6570\u636e\u7c7b\u578b \u53d8\u91cf\u540d <span class=\"token operator\">=<\/span> \u521d\u59cb\u5316\u503c<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u58f0\u660e\u53d8\u91cf\u5e76\u8d4b\u503c<\/span>\n<span class=\"token keyword\">int<\/span> age <span class=\"token operator\">=<\/span> <span class=\"token number\">18<\/span><span class=\"token punctuation\">;<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>age<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n<\/code><\/pre>\n<p>\u6216\u8005<\/p>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token comment\">\/\/ \u5148\u58f0\u660e\uff0c\u540e\u8d4b\u503c\uff08\u4f7f\u7528\u524d\u8d4b\u503c\u5373\u53ef\uff09<\/span>\n\u6570\u636e\u7c7b\u578b \u53d8\u91cf\u540d<span class=\"token punctuation\">;<\/span>\n\u53d8\u91cf\u540d <span class=\"token operator\">=<\/span> \u521d\u59cb\u5316\u503c<span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">double<\/span> money<span class=\"token punctuation\">;<\/span>\nmoney <span class=\"token operator\">=<\/span> <span class=\"token number\">55.5<\/span><span class=\"token punctuation\">;<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>money<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n<\/code><\/pre>\n<pre class=\"language-java prettyprint linenums\"><code>\u8fd8\u53ef\u4ee5\u5728\u540c\u4e00\u884c\u5b9a\u4e49\u591a\u4e2a\u540c\u4e00\u79cd\u6570\u636e\u7c7b\u578b\u7684\u53d8\u91cf\uff0c\u4e2d\u95f4\u4f7f\u7528\u9017\u53f7\u9694\u5f00\u3002\u4f46\u4e0d\u5efa\u8bae\u4f7f\u7528\u8fd9\u79cd\u65b9\u5f0f\uff0c\u964d\u4f4e\u7a0b\u5e8f\u7684\u53ef\u8bfb\u6027\u3002\n<\/code><\/pre>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token keyword\">int<\/span> a <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">,<\/span> b <span class=\"token operator\">=<\/span> <span class=\"token number\">20<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u5b9a\u4e49int\u7c7b\u578b\u7684\u53d8\u91cfa\u548cb\uff0c\u4e2d\u95f4\u4f7f\u7528\u9017\u53f7\u9694\u5f00<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>a<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>b<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n\n<span class=\"token keyword\">int<\/span> c<span class=\"token punctuation\">,<\/span>d<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u58f0\u660eint\u7c7b\u578b\u7684\u53d8\u91cfc\u548cd\uff0c\u4e2d\u95f4\u4f7f\u7528\u9017\u53f7\u9694\u5f00<\/span>\nc <span class=\"token operator\">=<\/span> <span class=\"token number\">30<\/span><span class=\"token punctuation\">;<\/span>\nd <span class=\"token operator\">=<\/span> <span class=\"token number\">40<\/span><span class=\"token punctuation\">;<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>c<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>d<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n<\/code><\/pre>\n<p>\u53d8\u91cf\u7684\u4f7f\u7528\uff1a\u901a\u8fc7\u53d8\u91cf\u540d\u8bbf\u95ee\u5373\u53ef\u3002<\/p>\n<h6>3.5.2 \u4f7f\u7528\u53d8\u91cf\u65f6\u7684\u6ce8\u610f\u4e8b\u9879<\/h6>\n<ol>\n<li><\/li>\n<\/ol>\n<blockquote>\n<p>\u5728\u540c\u4e00\u5bf9\u82b1\u62ec\u53f7\u4e2d\uff0c\u53d8\u91cf\u540d\u4e0d\u80fd\u91cd\u590d\u3002<br \/> 2. \u53d8\u91cf\u5728\u4f7f\u7528\u4e4b\u524d\uff0c\u5fc5\u987b\u521d\u59cb\u5316\uff08\u8d4b\u503c\uff09\u3002<br \/> 3. \u5b9a\u4e49long\u7c7b\u578b\u7684\u53d8\u91cf\u65f6\uff0c\u9700\u8981\u5728\u6574\u6570\u7684\u540e\u9762\u52a0L\uff08\u5927\u5c0f\u5199\u5747\u53ef\uff0c\u5efa\u8bae\u5927\u5199\uff09\u3002\u56e0\u4e3a\u6574\u6570\u9ed8\u8ba4\u662fint\u7c7b\u578b\uff0c\u6574\u6570\u592a\u5927\u53ef\u80fd\u8d85\u51faint\u8303\u56f4\u3002<br \/> 4. \u5b9a\u4e49float\u7c7b\u578b\u7684\u53d8\u91cf\u65f6\uff0c\u9700\u8981\u5728\u5c0f\u6570\u7684\u540e\u9762\u52a0F\uff08\u5927\u5c0f\u5199\u5747\u53ef\uff0c\u5efa\u8bae\u5927\u5199\uff09\u3002\u56e0\u4e3a\u6d6e\u70b9\u6570\u7684\u9ed8\u8ba4\u7c7b\u578b\u662fdouble\uff0c double\u7684\u53d6\u503c\u8303\u56f4\u662f\u5927\u4e8efloat\u7684\uff0c\u7c7b\u578b\u4e0d\u517c\u5bb9\u3002<\/p>\n<\/blockquote>\n<h5>4.5 \u5173\u952e\u5b57\u3001\u6807\u5fd7\u7b26\uff08\u8bb0\u5fc6\u3001\u7406\u89e3\uff09<\/h5>\n<p><strong>\u5173\u952e\u5b57<\/strong><\/p>\n<blockquote>\n<p>Java\u81ea\u5df1\u4fdd\u7559\u7684\u4e00\u4e9b\u5355\u8bcd\uff0c\u4f5c\u4e3a\u7279\u6b8a\u529f\u80fd\u7684\uff0c\u4f8b\u5982\uff1apublic\u3001class\u3001byte\u3001short\u3001int\u3001long\u3001double\u2026<\/p>\n<p>\u6211\u4eec\u4e0d\u80fd\u7528\u6765\u4f5c\u4e3a\u7c7b\u540d\u6216\u8005\u662f\u53d8\u91cf\u540d\u79f0\uff0c\u5426\u5219\u62a5\u9519\u3002<\/p>\n<p>\u6ce8\u610f\uff1a\u5173\u952e\u5b57\u5f88\u591a\uff0c\u4e0d\u7528\u523b\u610f\u53bb\u8bb0\u3002<\/p>\n<\/blockquote>\n<table>\n<thead>\n<tr>\n<th><strong>abstract<\/strong><\/th>\n<th><strong>assert<\/strong><\/th>\n<th><strong>boolean<\/strong><\/th>\n<th><strong>break<\/strong><\/th>\n<th><strong>byte<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>case<\/strong><\/td>\n<td><strong>catch<\/strong><\/td>\n<td><strong>char<\/strong><\/td>\n<td><strong>class<\/strong><\/td>\n<td><strong>const<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>continue<\/strong><\/td>\n<td><strong>default<\/strong><\/td>\n<td><strong>do<\/strong><\/td>\n<td><strong>double<\/strong><\/td>\n<td><strong>else<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>enum<\/strong><\/td>\n<td><strong>extends<\/strong><\/td>\n<td><strong>final<\/strong><\/td>\n<td><strong>finally<\/strong><\/td>\n<td><strong>float<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>for<\/strong><\/td>\n<td><strong>goto<\/strong><\/td>\n<td><strong>if<\/strong><\/td>\n<td><strong>implements<\/strong><\/td>\n<td><strong>import<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>instanceof<\/strong><\/td>\n<td><strong>int<\/strong><\/td>\n<td><strong>interface<\/strong><\/td>\n<td><strong>long<\/strong><\/td>\n<td><strong>native<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>new<\/strong><\/td>\n<td><strong>package<\/strong><\/td>\n<td><strong>private<\/strong><\/td>\n<td><strong>protected<\/strong><\/td>\n<td><strong>public<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>return<\/strong><\/td>\n<td><strong>strictfp<\/strong><\/td>\n<td><strong>short<\/strong><\/td>\n<td><strong>static<\/strong><\/td>\n<td><strong>super<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>switch<\/strong><\/td>\n<td><strong>synchronized<\/strong><\/td>\n<td><strong>this<\/strong><\/td>\n<td><strong>throw<\/strong><\/td>\n<td><strong>throws<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>transient<\/strong><\/td>\n<td><strong>try<\/strong><\/td>\n<td><strong>void<\/strong><\/td>\n<td><strong>volatile<\/strong><\/td>\n<td><strong>while<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u6807\u5fd7\u7b26<\/strong><\/p>\n<blockquote>\n<p>\u6807\u5fd7\u7b26\u5c31\u662f\u7531\u4e00\u4e9b\u5b57\u7b26\u3001\u7b26\u53f7\u7ec4\u5408\u8d77\u6765\u7684\u540d\u79f0\uff0c\u7528\u4e8e\u7ed9\u7c7b\uff0c\u65b9\u6cd5\uff0c\u53d8\u91cf\u7b49\u8d77\u540d\u5b57\u7684\u89c4\u77e9\u3002<\/p>\n<p>\u57fa\u672c\u8981\u6c42\uff1a\u7531\u6570\u5b57\u3001\u5b57\u6bcd\u3001\u4e0b\u5212\u7ebf(_)\u548c\u7f8e\u5143\u7b26($)\u7b49\u7ec4\u6210<\/p>\n<p>\u5f3a\u5236\u8981\u6c42\uff1a\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u5934\u3001\u4e0d\u80fd\u662f\u5173\u952e\u5b57\u3001\u533a\u5206\u5927\u5c0f\u5199<\/p>\n<\/blockquote>\n<p><strong>\u57fa\u672c\u547d\u4ee4\u89c4\u8303<\/strong><\/p>\n<blockquote>\n<p>\u53d8\u91cf\u540d\u79f0\uff1a\u6ee1\u8db3\u6807\u8bc6\u7b26\u89c4\u5219\uff0c\u5efa\u8bae\u5168\u82f1\u6587\u3001\u6709\u610f\u4e49\u3001\u9996\u5b57\u6bcd\u5c0f\u5199\uff0c\u6ee1\u8db3\u201c\u9a7c\u5cf0\u6a21\u5f0f\u201d\uff0c\u4f8b\u5982\uff1aint studyNumber = 59\u3002<\/p>\n<p>\u7c7b\u540d\u79f0\uff1a \u6ee1\u8db3\u6807\u8bc6\u7b26\u89c4\u5219\uff0c\u5efa\u8bae\u5168\u82f1\u6587\u3001\u6709\u610f\u4e49\u3001\u9996\u5b57\u6bcd\u5927\u5199\uff0c\u6ee1\u8db3\u201c\u9a7c\u5cf0\u6a21\u5f0f\u201d\uff0c\u4f8b\u5982\uff1aHelloWorld.java\u3002<\/p>\n<\/blockquote>\n<h2>\ud83d\udc495.\u7c7b\u578b\u8f6c\u6362\u95ee\u9898\ud83d\udc48<\/h2>\n<h6>\u7c7b\u578b\u8f6c\u6362\uff08\u7406\u89e3\uff09<\/h6>\n<blockquote>\n<p>\u5728Java\u4e2d\uff0c\u4f1a\u5b58\u5728\u4e0d\u540c\u7c7b\u578b\u7684\u6570\u636e\u9700\u8981\u4e00\u8d77\u53c2\u4e0e\u8fd0\u7b97\uff0c\u6240\u4ee5\u8fd9\u4e9b\u6570\u636e\u7c7b\u578b\u4e4b\u95f4\u662f\u9700\u8981\u76f8\u4e92\u8f6c\u6362\u7684\uff0c\u5206\u4e3a\u4e24\u79cd\u60c5\u51b5\uff1a\u81ea\u52a8\u7c7b\u578b\u8f6c\u6362\u548c\u5f3a\u5236\u7c7b\u578b\u8f6c\u6362\u3002<\/p>\n<\/blockquote>\n<h6>\u81ea\u52a8\u7c7b\u578b\u8f6c\u6362<\/h6>\n<blockquote>\n<p>*\u7c7b\u578b\u8303\u56f4\u5c0f<strong>\u7684\u53d8\u91cf\uff0c\u53ef\u4ee5<\/strong>\u76f4\u63a5\u8d4b\u503c<strong>\u7ed9<\/strong>\u7c7b\u578b\u8303\u56f4\u5927**\u7684\u53d8\u91cf\u3002<\/p>\n<p>\u628a\u4e00\u4e2a\u8868\u793a\u6570\u636e\u8303\u56f4\u5c0f\u7684\u6570\u503c\u6216\u8005\u53d8\u91cf\u8d4b\u503c\u7ed9\u53e6\u4e00\u4e2a\u8868\u793a\u6570\u636e\u8303\u56f4\u5927\u7684\u53d8\u91cf\u3002\u8fd9\u79cd\u8f6c\u6362\u65b9\u5f0f\u662f\u81ea\u52a8\u7684\uff0c\u76f4\u63a5\u4e66\u5199\u5373\u53ef\u3002\u4f8b\u5982\uff1a<\/p>\n<\/blockquote>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token keyword\">double<\/span> num <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u5c06int\u7c7b\u578b\u768410\u76f4\u63a5\u8d4b\u503c\u7ed9double\u7c7b\u578b<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>num<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa10.0<\/span>\n\n<span class=\"token keyword\">byte<\/span> a <span class=\"token operator\">=<\/span> <span class=\"token number\">12<\/span> <span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">int<\/span> b <span class=\"token operator\">=<\/span> a<span class=\"token punctuation\">;<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>b<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ 12<\/span>\n\n<\/code><\/pre>\n<h6><strong>\u8868\u8fbe\u5f0f\u7684\u81ea\u52a8\u7c7b\u578b\u8f6c\u6362<\/strong><\/h6>\n<blockquote>\n<p>\u5728\u8868\u8fbe\u5f0f\u4e2d\uff0c\u5c0f\u8303\u56f4\u7c7b\u578b\u7684\u53d8\u91cf\u4f1a\u81ea\u52a8\u8f6c\u6362\u6210\u5f53\u524d\u8f83\u5927\u8303\u56f4\u7684\u7c7b\u578b\u518d\u8fd0\u7b97\u3002<\/p>\n<\/blockquote>\n<p><strong>\u6ce8\u610f\u4e8b\u9879\uff1a<\/strong><\/p>\n<blockquote>\n<p>\u8868\u8fbe\u5f0f\u7684\u6700\u7ec8\u7ed3\u679c\u7c7b\u578b\u7531\u8868\u8fbe\u5f0f\u4e2d\u7684\u6700\u9ad8\u7c7b\u578b\u51b3\u5b9a\u3002<\/p>\n<p>\u5728\u8868\u8fbe\u5f0f\u4e2d\uff0cbyte\u3001short\u3001char \u662f\u76f4\u63a5\u8f6c\u6362\u6210int\u7c7b\u578b\u53c2\u4e0e\u8fd0\u7b97\u7684\u3002<\/p>\n<\/blockquote>\n<h6>\u5f3a\u5236\u7c7b\u578b\u8f6c\u6362<\/h6>\n<blockquote>\n<p>\u7c7b\u578b\u8303\u56f4\u5927\u7684\u6570\u636e\u6216\u8005\u53d8\u91cf\uff0c\u4e0d\u80fd\u76f4\u63a5<strong>\u8d4b\u503c<\/strong>\u7ed9<strong>\u7c7b\u578b\u8303\u56f4\u5c0f<\/strong>\u7684\u53d8\u91cf\uff0c\u4f1a\u62a5\u9519\uff0c\u628a\u4e00\u4e2a\u8868\u793a\u6570\u636e\u8303\u56f4\u5927\u7684\u6570\u503c\u6216\u8005\u53d8\u91cf\u8d4b\u503c\u7ed9\u53e6\u4e00\u4e2a\u8868\u793a\u6570\u636e\u8303\u56f4\u5c0f\u7684\u53d8\u91cf\u5fc5\u987b\u8fdb\u884c\u5f3a\u5236\u7c7b\u578b\u8f6c\u6362\u3002<\/p>\n<p>\u5f3a\u5236\u7c7b\u578b\u8f6c\u6362\u683c\u5f0f\uff1a\u76ee\u6807\u6570\u636e\u7c7b\u578b \u53d8\u91cf\u540d = (\u76ee\u6807\u6570\u636e\u7c7b\u578b)\u503c\u6216\u8005\u53d8\u91cf;<\/p>\n<p>\u200b \u4f8b\u5982\uff1a<\/p>\n<\/blockquote>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token keyword\">double<\/span> num1 <span class=\"token operator\">=<\/span> <span class=\"token number\">5.5<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">int<\/span> num2 <span class=\"token operator\">=<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span><span class=\"token punctuation\">)<\/span> num1<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u5c06double\u7c7b\u578b\u7684num1\u5f3a\u5236\u8f6c\u6362\u4e3aint\u7c7b\u578b<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>num2<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa5\uff08\u5c0f\u6570\u4f4d\u76f4\u63a5\u820d\u5f03\uff09<\/span>\n<\/code><\/pre>\n<blockquote>\n<p>\u8bf4\u660e\uff1a<\/p>\n<ol>\n<li>char\u7c7b\u578b\u7684\u6570\u636e\u8f6c\u6362\u4e3aint\u7c7b\u578b\u662f\u6309\u7167\u7801\u8868\u4e2d\u5bf9\u5e94\u7684int\u503c\u8fdb\u884c\u8ba1\u7b97\u7684\u3002\u6bd4\u5982\u5728ASCII\u7801\u8868\u4e2d\uff0c'a\u2019\u5bf9\u5e9497\u3002<\/li>\n<\/ol>\n<\/blockquote>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token keyword\">int<\/span> a <span class=\"token operator\">=<\/span> <span class=\"token string\">'a'<\/span><span class=\"token punctuation\">;<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>a<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u5c06\u8f93\u51fa97<\/span>\n<\/code><\/pre>\n<ol start=\"2\">\n<li>\u6574\u6570\u9ed8\u8ba4\u662fint\u7c7b\u578b\uff0cbyte\u3001short\u548cchar\u7c7b\u578b\u6570\u636e\u53c2\u4e0e\u8fd0\u7b97\u5747\u4f1a\u81ea\u52a8\u8f6c\u6362\u4e3aint\u7c7b\u578b\u3002<\/li>\n<\/ol>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token keyword\">byte<\/span> b1 <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">byte<\/span> b2 <span class=\"token operator\">=<\/span> <span class=\"token number\">20<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">byte<\/span> b3 <span class=\"token operator\">=<\/span> b1 <span class=\"token operator\">+<\/span> b2<span class=\"token punctuation\">;<\/span> \n<span class=\"token comment\">\/\/ \u7b2c\u4e09\u884c\u4ee3\u7801\u4f1a\u62a5\u9519\uff0cb1\u548cb2\u4f1a\u81ea\u52a8\u8f6c\u6362\u4e3aint\u7c7b\u578b\uff0c\u8ba1\u7b97\u7ed3\u679c\u4e3aint\uff0cint\u8d4b\u503c\u7ed9byte\u9700\u8981\u5f3a\u5236\u7c7b\u578b\u8f6c\u6362\u3002<\/span>\n<span class=\"token comment\">\/\/ \u4fee\u6539\u4e3a:<\/span>\n<span class=\"token keyword\">int<\/span> num <span class=\"token operator\">=<\/span> b1 <span class=\"token operator\">+<\/span> b2<span class=\"token punctuation\">;<\/span>\n<span class=\"token comment\">\/\/ \u6216\u8005\uff1a<\/span>\n<span class=\"token keyword\">byte<\/span> b3 <span class=\"token operator\">=<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">byte<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">(<\/span>b1 <span class=\"token operator\">+<\/span> b2<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n<\/code><\/pre>\n<ol>\n<li>boolean\u7c7b\u578b\u4e0d\u80fd\u4e0e\u5176\u4ed6\u57fa\u672c\u6570\u636e\u7c7b\u578b\u76f8\u4e92\u8f6c\u6362\u3002<\/li>\n<\/ol>\n<h2>\ud83d\udc496. \u8fd0\u7b97\u7b26\ud83d\udc48<\/h2>\n<h4>6.1 \u7b97\u672f\u8fd0\u7b97\u7b26\uff08\u7406\u89e3\uff09<\/h4>\n<h5>6.1.1 \u8fd0\u7b97\u7b26\u548c\u8868\u8fbe\u5f0f<\/h5>\n<blockquote>\n<p>\u8fd0\u7b97\u7b26\uff1a\u5bf9\u5e38\u91cf\u6216\u8005\u53d8\u91cf\u8fdb\u884c\u64cd\u4f5c\u7684\u7b26\u53f7<\/p>\n<p>\u8868\u8fbe\u5f0f\uff1a\u7528\u8fd0\u7b97\u7b26\u628a\u5e38\u91cf\u6216\u8005\u53d8\u91cf\u8fde\u63a5\u8d77\u6765\u7b26\u5408java\u8bed\u6cd5\u7684\u5f0f\u5b50\u5c31\u53ef\u4ee5\u79f0\u4e3a\u8868\u8fbe\u5f0f\u3002<\/p>\n<p>\u200b \u4e0d\u540c\u8fd0\u7b97\u7b26\u8fde\u63a5\u7684\u8868\u8fbe\u5f0f\u4f53\u73b0\u7684\u662f\u4e0d\u540c\u7c7b\u578b\u7684\u8868\u8fbe\u5f0f\u3002<\/p>\n<p>\u4e3e\u4f8b\u8bf4\u660e\uff1a<\/p>\n<\/blockquote>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token keyword\">int<\/span> a <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">int<\/span> b <span class=\"token operator\">=<\/span> <span class=\"token number\">20<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">int<\/span> c <span class=\"token operator\">=<\/span> a <span class=\"token operator\">+<\/span> b<span class=\"token punctuation\">;<\/span>\n<\/code><\/pre>\n<blockquote>\n<p>+\uff1a\u662f\u8fd0\u7b97\u7b26\uff0c\u5e76\u4e14\u662f\u7b97\u672f\u8fd0\u7b97\u7b26\u3002<\/p>\n<p>a + b\uff1a\u662f\u8868\u8fbe\u5f0f\uff0c\u7531\u4e8e+\u662f\u7b97\u672f\u8fd0\u7b97\u7b26\uff0c\u6240\u4ee5\u8fd9\u4e2a\u8868\u8fbe\u5f0f\u53eb\u7b97\u672f\u8868\u8fbe\u5f0f\u3002<\/p>\n<\/blockquote>\n<h5>6.1.2 \u7b97\u672f\u8fd0\u7b97\u7b26<\/h5>\n<table>\n<thead>\n<tr>\n<th>\u7b26\u53f7<\/th>\n<th>\u4f5c\u7528<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>+<\/td>\n<td>\u52a0<\/td>\n<td>\u53c2\u770b\u5c0f\u5b66\u4e00\u5e74\u7ea7<\/td>\n<\/tr>\n<tr>\n<td>-<\/td>\n<td>\u51cf<\/td>\n<td>\u53c2\u770b\u5c0f\u5b66\u4e00\u5e74\u7ea7<\/td>\n<\/tr>\n<tr>\n<td>*<\/td>\n<td>\u4e58<\/td>\n<td>\u53c2\u770b\u5c0f\u5b66\u4e8c\u5e74\u7ea7\uff0c\u4e0e\u201c\u00d7\u201d\u76f8\u540c<\/td>\n<\/tr>\n<tr>\n<td>\/<\/td>\n<td>\u9664<\/td>\n<td>\u53c2\u770b\u5c0f\u5b66\u4e8c\u5e74\u7ea7\uff0c\u4e0e\u201c\u00f7\u201d\u76f8\u540c<\/td>\n<\/tr>\n<tr>\n<td>%<\/td>\n<td>\u53d6\u4f59<\/td>\n<td>\u83b7\u53d6\u7684\u662f\u4e24\u4e2a\u6570\u636e\u505a\u9664\u6cd5\u7684\u4f59\u6570<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote>\n<p>\u6ce8\u610f\uff1a<\/p>\n<p>\/\u548c%\u7684\u533a\u522b\uff1a\u4e24\u4e2a\u6570\u636e\u505a\u9664\u6cd5\uff0c\/\u53d6\u7ed3\u679c\u7684\u5546\uff0c%\u53d6\u7ed3\u679c\u7684\u4f59\u6570\u3002<\/p>\n<p>\u6574\u6570\u64cd\u4f5c\u53ea\u80fd\u5f97\u5230\u6574\u6570\uff0c\u8981\u60f3\u5f97\u5230\u5c0f\u6570\uff0c\u5fc5\u987b\u6709\u6d6e\u70b9\u6570\u53c2\u4e0e\u8fd0\u7b97\u3002<\/p>\n<\/blockquote>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token keyword\">int<\/span> a <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">int<\/span> b <span class=\"token operator\">=<\/span> <span class=\"token number\">3<\/span><span class=\"token punctuation\">;<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>a <span class=\"token operator\">\/<\/span> b<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa\u7ed3\u679c3<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>a <span class=\"token operator\">%<\/span> b<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa\u7ed3\u679c1<\/span>\n<\/code><\/pre>\n<h5>6.1.3 \u5b57\u7b26\u7684\u201c+\u201d\u64cd\u4f5c<\/h5>\n<blockquote>\n<p>char\u7c7b\u578b\u53c2\u4e0e\u7b97\u672f\u8fd0\u7b97\uff0c\u4f7f\u7528\u7684\u662f\u8ba1\u7b97\u673a\u5e95\u5c42\u5bf9\u5e94\u7684\u5341\u8fdb\u5236\u6570\u503c\u3002\u9700\u8981\u6211\u4eec\u8bb0\u4f4f\u4e09\u4e2a\u5b57\u7b26\u5bf9\u5e94\u7684\u6570\u503c\uff1a<\/p>\n<p>\u2018a\u2019 \u2013 97 a-z\u662f\u8fde\u7eed\u7684\uff0c\u6240\u4ee5\u2019b\u2019\u5bf9\u5e94\u7684\u6570\u503c\u662f98\uff0c'c\u2019\u662f99\uff0c\u4f9d\u6b21\u9012\u52a0<\/p>\n<p>\u2018A\u2019 \u2013 65 A-Z\u662f\u8fde\u7eed\u7684\uff0c\u6240\u4ee5\u2019B\u2019\u5bf9\u5e94\u7684\u6570\u503c\u662f66\uff0c'C\u2019\u662f67\uff0c\u4f9d\u6b21\u9012\u52a0<\/p>\n<p>\u20180\u2019 \u2013 48 0-9\u662f\u8fde\u7eed\u7684\uff0c\u6240\u4ee5\u20191\u2019\u5bf9\u5e94\u7684\u6570\u503c\u662f49\uff0c'2\u2019\u662f50\uff0c\u4f9d\u6b21\u9012\u52a0<\/p>\n<\/blockquote>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token comment\">\/\/ \u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u5b57\u7b26\u4e0e\u6574\u6570\u505a\u7b97\u672f\u8fd0\u7b97\uff0c\u5f97\u51fa\u5b57\u7b26\u5bf9\u5e94\u7684\u6570\u503c\u662f\u591a\u5c11<\/span>\n<span class=\"token keyword\">char<\/span> ch1 <span class=\"token operator\">=<\/span> <span class=\"token string\">'a'<\/span><span class=\"token punctuation\">;<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>ch1 <span class=\"token operator\">+<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa98\uff0c97 + 1 = 98<\/span>\n\n<span class=\"token keyword\">char<\/span> ch2 <span class=\"token operator\">=<\/span> <span class=\"token string\">'A'<\/span><span class=\"token punctuation\">;<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>ch2 <span class=\"token operator\">+<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa66\uff0c65 + 1 = 66<\/span>\n\n<span class=\"token keyword\">char<\/span> ch3 <span class=\"token operator\">=<\/span> <span class=\"token string\">'0'<\/span><span class=\"token punctuation\">;<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>ch3 <span class=\"token operator\">+<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa49\uff0c48 + 1 = 49<\/span>\n<\/code><\/pre>\n<blockquote>\n<p>\u7b97\u672f\u8868\u8fbe\u5f0f\u4e2d\u5305\u542b\u4e0d\u540c\u7684\u57fa\u672c\u6570\u636e\u7c7b\u578b\u7684\u503c\u7684\u65f6\u5019\uff0c\u6574\u4e2a\u7b97\u672f\u8868\u8fbe\u5f0f\u7684\u7c7b\u578b\u4f1a\u81ea\u52a8\u8fdb\u884c\u63d0\u5347\u3002<\/p>\n<p>\u63d0\u5347\u89c4\u5219\uff1a<\/p>\n<p>byte\u7c7b\u578b\uff0cshort\u7c7b\u578b\u548cchar\u7c7b\u578b\u5c06\u88ab\u63d0\u5347\u5230int\u7c7b\u578b\uff0c\u4e0d\u7ba1\u662f\u5426\u6709\u5176\u4ed6\u7c7b\u578b\u53c2\u4e0e\u8fd0\u7b97\u3002<\/p>\n<p>\u6574\u4e2a\u8868\u8fbe\u5f0f\u7684\u7c7b\u578b\u81ea\u52a8\u63d0\u5347\u5230\u4e0e\u8868\u8fbe\u5f0f\u4e2d\u6700\u9ad8\u7b49\u7ea7\u7684\u64cd\u4f5c\u6570\u76f8\u540c\u7684\u7c7b\u578b<\/p>\n<p>\u200b \u7b49\u7ea7\u987a\u5e8f\uff1abyte,short,char --&gt; int --&gt; long --&gt; float --&gt; double<\/p>\n<\/blockquote>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token keyword\">byte<\/span> b1 <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">byte<\/span> b2 <span class=\"token operator\">=<\/span> <span class=\"token number\">20<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token comment\">\/\/ byte b3 = b1 + b2; \/\/ \u8be5\u884c\u62a5\u9519\uff0c\u56e0\u4e3abyte\u7c7b\u578b\u53c2\u4e0e\u7b97\u672f\u8fd0\u7b97\u4f1a\u81ea\u52a8\u63d0\u793a\u4e3aint\uff0cint\u8d4b\u503c\u7ed9byte\u53ef\u80fd\u635f\u5931\u7cbe\u5ea6<\/span>\n<span class=\"token keyword\">int<\/span> i3 <span class=\"token operator\">=<\/span> b1 <span class=\"token operator\">+<\/span> b2<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u5e94\u8be5\u4f7f\u7528int\u63a5\u6536<\/span>\n<span class=\"token keyword\">byte<\/span> b3 <span class=\"token operator\">=<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">byte<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">(<\/span>b1 <span class=\"token operator\">+<\/span> b2<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u6216\u8005\u5c06\u7ed3\u679c\u5f3a\u5236\u8f6c\u6362\u4e3abyte\u7c7b\u578b<\/span>\n<span class=\"token operator\">--<\/span><span class=\"token operator\">--<\/span><span class=\"token operator\">--<\/span><span class=\"token operator\">--<\/span><span class=\"token operator\">--<\/span><span class=\"token operator\">--<\/span><span class=\"token operator\">--<\/span><span class=\"token operator\">--<\/span><span class=\"token operator\">--<\/span><span class=\"token operator\">--<\/span><span class=\"token operator\">--<\/span><span class=\"token operator\">--<\/span><span class=\"token operator\">--<\/span><span class=\"token operator\">--<\/span><span class=\"token operator\">--<\/span><span class=\"token operator\">-<\/span>\n<span class=\"token keyword\">int<\/span> num1 <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">double<\/span> num2 <span class=\"token operator\">=<\/span> <span class=\"token number\">20.0<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">double<\/span> num3 <span class=\"token operator\">=<\/span> num1 <span class=\"token operator\">+<\/span> num2<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u4f7f\u7528double\u63a5\u6536\uff0c\u56e0\u4e3anum1\u4f1a\u81ea\u52a8\u63d0\u5347\u4e3adouble\u7c7b\u578b<\/span>\n<\/code><\/pre>\n<blockquote>\n<p>tips\uff1a\u6b63\u662f\u7531\u4e8e\u4e0a\u8ff0\u539f\u56e0\uff0c\u6240\u4ee5\u5728\u7a0b\u5e8f\u5f00\u53d1\u4e2d\u6211\u4eec\u5f88\u5c11\u4f7f\u7528byte\u6216\u8005short\u7c7b\u578b\u5b9a\u4e49\u6574\u6570\u3002\u4e5f\u5f88\u5c11\u4f1a\u4f7f\u7528char\u7c7b\u578b\u5b9a\u4e49\u5b57\u7b26\uff0c\u800c\u4f7f\u7528\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u66f4\u4e0d\u4f1a\u4f7f\u7528char\u7c7b\u578b\u505a\u7b97\u672f\u8fd0\u7b97\u3002<\/p>\n<\/blockquote>\n<h5>6.1.4 \u5b57\u7b26\u4e32\u7684\u201c+\u201d\u64cd\u4f5c<\/h5>\n<p>\u5f53\u201c+\u201d\u64cd\u4f5c\u4e2d\u51fa\u73b0\u5b57\u7b26\u4e32\u65f6\uff0c\u8fd9\u4e2a\u201d+\u201d\u662f\u5b57\u7b26\u4e32\u8fde\u63a5\u7b26\uff0c\u800c\u4e0d\u662f\u7b97\u672f\u8fd0\u7b97\u3002<\/p>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\">System<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"heihei\"<\/span><span class=\"token operator\">+<\/span> <span class=\"token number\">666<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa\uff1aheihei666<\/span>\n<\/code><\/pre>\n<p>\u5728\u201d+\u201d\u64cd\u4f5c\u4e2d\uff0c\u5982\u679c\u51fa\u73b0\u4e86\u5b57\u7b26\u4e32\uff0c\u5c31\u662f\u8fde\u63a5\u8fd0\u7b97\u7b26\uff0c\u5426\u5219\u5c31\u662f\u7b97\u672f\u8fd0\u7b97\u3002\u5f53\u8fde\u7eed\u8fdb\u884c\u201c+\u201d\u64cd\u4f5c\u65f6\uff0c\u4ece\u5de6\u5230\u53f3\u9010\u4e2a\u6267\u884c\u3002<\/p>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\">System<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span> <span class=\"token operator\">+<\/span> <span class=\"token number\">99<\/span> <span class=\"token operator\">+<\/span> <span class=\"token string\">\"\u5e74\"<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa\uff1a199\u5e74<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span> <span class=\"token operator\">+<\/span> <span class=\"token number\">2<\/span> <span class=\"token operator\">+<\/span> <span class=\"token string\">\"hahaha\"<\/span> <span class=\"token operator\">+<\/span> <span class=\"token number\">3<\/span> <span class=\"token operator\">+<\/span> <span class=\"token number\">4<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa\uff1a3hahah34<\/span>\n<span class=\"token comment\">\/\/ \u53ef\u4ee5\u4f7f\u7528\u5c0f\u62ec\u53f7\u6539\u53d8\u8fd0\u7b97\u7684\u4f18\u5148\u7ea7 <\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span> <span class=\"token operator\">+<\/span> <span class=\"token number\">2<\/span> <span class=\"token operator\">+<\/span> <span class=\"token string\">\"heiheihei\"<\/span> <span class=\"token operator\">+<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token number\">3<\/span> <span class=\"token operator\">+<\/span> <span class=\"token number\">4<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fa\uff1a3heiheihei7<\/span>\n<\/code><\/pre>\n<h4>6.2 \u8d4b\u503c\u8fd0\u7b97\u7b26\uff08\u5e94\u7528\uff09<\/h4>\n<blockquote>\n<p>\u8d4b\u503c\u8fd0\u7b97\u7b26\u7684\u4f5c\u7528\u662f\u5c06\u4e00\u4e2a\u8868\u8fbe\u5f0f\u7684\u503c\u8d4b\u7ed9\u5de6\u8fb9\uff0c\u5de6\u8fb9\u5fc5\u987b\u662f\u53ef\u4fee\u6539\u7684\uff0c\u4e0d\u80fd\u662f\u5e38\u91cf\u3002<\/p>\n<\/blockquote>\n<table>\n<thead>\n<tr>\n<th>\u7b26\u53f7<\/th>\n<th>\u4f5c\u7528<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>=<\/td>\n<td>\u8d4b\u503c<\/td>\n<td>a=10\uff0c\u5c0610\u8d4b\u503c\u7ed9\u53d8\u91cfa<\/td>\n<\/tr>\n<tr>\n<td>+=<\/td>\n<td>\u52a0\u540e\u8d4b\u503c<\/td>\n<td>a+=b\uff0c\u5c06a+b\u7684\u503c\u7ed9a<\/td>\n<\/tr>\n<tr>\n<td>-=<\/td>\n<td>\u51cf\u540e\u8d4b\u503c<\/td>\n<td>a-=b\uff0c\u5c06a-b\u7684\u503c\u7ed9a<\/td>\n<\/tr>\n<tr>\n<td>*=<\/td>\n<td>\u4e58\u540e\u8d4b\u503c<\/td>\n<td>a*=b\uff0c\u5c06a\u00d7b\u7684\u503c\u7ed9a<\/td>\n<\/tr>\n<tr>\n<td>\/=<\/td>\n<td>\u9664\u540e\u8d4b\u503c<\/td>\n<td>a\/=b\uff0c\u5c06a\u00f7b\u7684\u5546\u7ed9a<\/td>\n<\/tr>\n<tr>\n<td>%=<\/td>\n<td>\u53d6\u4f59\u540e\u8d4b\u503c<\/td>\n<td>a%=b\uff0c\u5c06a\u00f7b\u7684\u4f59\u6570\u7ed9a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6ce8\u610f\uff1a<\/p>\n<p>\u6269\u5c55\u7684\u8d4b\u503c\u8fd0\u7b97\u7b26\u9690\u542b\u4e86\u5f3a\u5236\u7c7b\u578b\u8f6c\u6362\u3002<\/p>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token keyword\">short<\/span> s <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span>\ns <span class=\"token operator\">=<\/span> s <span class=\"token operator\">+<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u6b64\u884c\u4ee3\u7801\u62a5\u51fa\uff0c\u56e0\u4e3a\u8fd0\u7b97\u4e2ds\u63d0\u5347\u4e3aint\u7c7b\u578b\uff0c\u8fd0\u7b97\u7ed3\u679cint\u8d4b\u503c\u7ed9short\u53ef\u80fd\u635f\u5931\u7cbe\u5ea6<\/span>\n\ns <span class=\"token operator\">+=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u6b64\u884c\u4ee3\u7801\u6ca1\u6709\u95ee\u9898\uff0c\u9690\u542b\u4e86\u5f3a\u5236\u7c7b\u578b\u8f6c\u6362\uff0c\u76f8\u5f53\u4e8e s = (short) (s + 10);<\/span>\n<\/code><\/pre>\n<h4>6.3 \u81ea\u589e\u81ea\u51cf\u8fd0\u7b97\u7b26\uff08\u7406\u89e3\uff09<\/h4>\n<table>\n<thead>\n<tr>\n<th>\u7b26\u53f7<\/th>\n<th>\u4f5c\u7528<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>++<\/td>\n<td>\u81ea\u589e<\/td>\n<td>\u53d8\u91cf\u7684\u503c\u52a01<\/td>\n<\/tr>\n<tr>\n<td>\u2013<\/td>\n<td>\u81ea\u51cf<\/td>\n<td>\u53d8\u91cf\u7684\u503c\u51cf1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote>\n<p>\u6ce8\u610f\u4e8b\u9879\uff1a<\/p>\n<p>\u200b ++\u548c-- \u65e2\u53ef\u4ee5\u653e\u5728\u53d8\u91cf\u7684\u540e\u8fb9\uff0c\u4e5f\u53ef\u4ee5\u653e\u5728\u53d8\u91cf\u7684\u524d\u8fb9\u3002<\/p>\n<p>\u200b \u5355\u72ec\u4f7f\u7528\u7684\u65f6\u5019\uff0c ++\u548c-- \u65e0\u8bba\u662f\u653e\u5728\u53d8\u91cf\u7684\u524d\u8fb9\u8fd8\u662f\u540e\u8fb9\uff0c\u7ed3\u679c\u662f\u4e00\u6837\u7684\u3002<\/p>\n<p>\u200b \u53c2\u4e0e\u64cd\u4f5c\u7684\u65f6\u5019\uff0c\u5982\u679c\u653e\u5728\u53d8\u91cf\u7684\u540e\u8fb9\uff0c\u5148\u62ff\u53d8\u91cf\u53c2\u4e0e\u64cd\u4f5c\uff0c\u540e\u62ff\u53d8\u91cf\u505a++\u6216\u8005\u2013\u3002<\/p>\n<p>\u200b \u53c2\u4e0e\u64cd\u4f5c\u7684\u65f6\u5019\uff0c\u5982\u679c\u653e\u5728\u53d8\u91cf\u7684\u524d\u8fb9\uff0c\u5148\u62ff\u53d8\u91cf\u505a++\u6216\u8005\u2013\uff0c\u540e\u62ff\u53d8\u91cf\u53c2\u4e0e\u64cd\u4f5c\u3002<\/p>\n<p>\u200b \u6700\u5e38\u89c1\u7684\u7528\u6cd5\uff1a\u5355\u72ec\u4f7f\u7528\u3002<\/p>\n<\/blockquote>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token keyword\">int<\/span> i <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span>\ni<span class=\"token operator\">++<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u5355\u72ec\u4f7f\u7528<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"i:\"<\/span> <span class=\"token operator\">+<\/span> i<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ i:11<\/span>\n\n<span class=\"token keyword\">int<\/span> j <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token operator\">++<\/span>j<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u5355\u72ec\u4f7f\u7528<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"j:\"<\/span> <span class=\"token operator\">+<\/span> j<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ j:11<\/span>\n\n<span class=\"token keyword\">int<\/span> x <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">int<\/span> y <span class=\"token operator\">=<\/span> x<span class=\"token operator\">++<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8d4b\u503c\u8fd0\u7b97\uff0c++\u5728\u540e\u8fb9\uff0c\u6240\u4ee5\u662f\u4f7f\u7528x\u539f\u6765\u7684\u503c\u8d4b\u503c\u7ed9y\uff0cx\u672c\u8eab\u81ea\u589e1<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"x:\"<\/span> <span class=\"token operator\">+<\/span> x <span class=\"token operator\">+<\/span> <span class=\"token string\">\", y:\"<\/span> <span class=\"token operator\">+<\/span> y<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ x:11\uff0cy:10<\/span>\n\n<span class=\"token keyword\">int<\/span> m <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">int<\/span> n <span class=\"token operator\">=<\/span> <span class=\"token operator\">++<\/span>m<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8d4b\u503c\u8fd0\u7b97\uff0c++\u5728\u524d\u8fb9\uff0c\u6240\u4ee5\u662f\u4f7f\u7528m\u81ea\u589e\u540e\u7684\u503c\u8d4b\u503c\u7ed9n\uff0cm\u672c\u8eab\u81ea\u589e1<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"m:\"<\/span> <span class=\"token operator\">+<\/span> m <span class=\"token operator\">+<\/span> <span class=\"token string\">\", m:\"<\/span> <span class=\"token operator\">+<\/span> m<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ m:11\uff0cm:11<\/span>\n<\/code><\/pre>\n<p>\u7ec3\u4e60\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/fb4639a6e493421f9781df1884bdbc26.png\" =\"\" =\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" alt=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5 (https:\/\/mushiming.com\/)  \u7b2c2\u5f20\" title=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5  \u7b2c2\u5f20-\u7a46\u4e16\u660e\u535a\u5ba2\" ><\/p>\n<h4>6.4 \u5173\u7cfb\u8fd0\u7b97\u7b26\uff08\u5e94\u7528\uff09<\/h4>\n<p>\u5173\u7cfb\u8fd0\u7b97\u7b26\u67096\u79cd\u5173\u7cfb\uff0c\u5206\u522b\u4e3a\u5c0f\u4e8e\u3001\u5c0f\u4e8e\u7b49\u4e8e\u3001\u5927\u4e8e\u3001\u7b49\u4e8e\u3001\u5927\u4e8e\u7b49\u4e8e\u3001\u4e0d\u7b49\u4e8e\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u7b26\u53f7<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>==<\/td>\n<td>a==b\uff0c\u5224\u65ada\u548cb\u7684\u503c\u662f\u5426\u76f8\u7b49\uff0c\u6210\u7acb\u4e3atrue\uff0c\u4e0d\u6210\u7acb\u4e3afalse<\/td>\n<\/tr>\n<tr>\n<td>!=<\/td>\n<td>a!=b\uff0c\u5224\u65ada\u548cb\u7684\u503c\u662f\u5426\u4e0d\u76f8\u7b49\uff0c\u6210\u7acb\u4e3atrue\uff0c\u4e0d\u6210\u7acb\u4e3afalse<\/td>\n<\/tr>\n<tr>\n<td>&gt;<\/td>\n<td>a&gt;b\uff0c\u5224\u65ada\u662f\u5426\u5927\u4e8eb\uff0c\u6210\u7acb\u4e3atrue\uff0c\u4e0d\u6210\u7acb\u4e3afalse<\/td>\n<\/tr>\n<tr>\n<td>&gt;=<\/td>\n<td>a&gt;=b\uff0c\u5224\u65ada\u662f\u5426\u5927\u4e8e\u7b49\u4e8eb\uff0c\u6210\u7acb\u4e3atrue\uff0c\u4e0d\u6210\u7acb\u4e3afalse<\/td>\n<\/tr>\n<tr>\n<td>&lt;<\/td>\n<td>a&lt;b\uff0c\u5224\u65ada\u662f\u5426\u5c0f\u4e8eb\uff0c\u6210\u7acb\u4e3atrue\uff0c\u4e0d\u6210\u7acb\u4e3afalse<\/td>\n<\/tr>\n<tr>\n<td>&lt;=<\/td>\n<td>a&lt;=b\uff0c\u5224\u65ada\u662f\u5426\u5c0f\u4e8e\u7b49\u4e8eb\uff0c\u6210\u7acb\u4e3atrue\uff0c\u4e0d\u6210\u7acb\u4e3afalse<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote>\n<p>\u6ce8\u610f\u4e8b\u9879\uff1a<\/p>\n<p>\u200b \u5173\u7cfb\u8fd0\u7b97\u7b26\u7684\u7ed3\u679c\u90fd\u662fboolean\u7c7b\u578b\uff0c\u8981\u4e48\u662ftrue\uff0c\u8981\u4e48\u662ffalse\u3002<\/p>\n<p>\u200b \u5343\u4e07\u4e0d\u8981\u628a\u201c<mark>\u201d\u8bef\u5199\u6210\u201c=\u201d\uff0c\"<\/mark>\u201c\u662f\u5224\u65ad\u662f\u5426\u76f8\u7b49\u7684\u5173\u7cfb\uff0c\u201d=\"\u662f\u8d4b\u503c\u3002<\/p>\n<\/blockquote>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token keyword\">int<\/span> a <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">int<\/span> b <span class=\"token operator\">=<\/span> <span class=\"token number\">20<\/span><span class=\"token punctuation\">;<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>a <span class=\"token operator\">==<\/span> b<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ false<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>a <span class=\"token operator\">!=<\/span> b<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ true<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>a <span class=\"token operator\">&gt;<\/span> b<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ false<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>a <span class=\"token operator\">&gt;=<\/span> b<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ false<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>a <span class=\"token operator\">&lt;<\/span> b<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ true<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>a <span class=\"token operator\">&lt;=<\/span> b<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ true<\/span>\n\n<span class=\"token comment\">\/\/ \u5173\u7cfb\u8fd0\u7b97\u7684\u7ed3\u679c\u80af\u5b9a\u662fboolean\u7c7b\u578b\uff0c\u6240\u4ee5\u4e5f\u53ef\u4ee5\u5c06\u8fd0\u7b97\u7ed3\u679c\u8d4b\u503c\u7ed9boolean\u7c7b\u578b\u7684\u53d8\u91cf<\/span>\n<span class=\"token keyword\">boolean<\/span> flag <span class=\"token operator\">=<\/span> a <span class=\"token operator\">&gt;<\/span> b<span class=\"token punctuation\">;<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span>flag<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8f93\u51fafalse<\/span>\n<\/code><\/pre>\n<h4>6.5 \u903b\u8f91\u8fd0\u7b97\u7b26\uff08\u5e94\u7528\uff09<\/h4>\n<p>\u903b\u8f91\u8fd0\u7b97\u7b26\u628a\u5404\u4e2a\u8fd0\u7b97\u7684\u5173\u7cfb\u8868\u8fbe\u5f0f\u8fde\u63a5\u8d77\u6765\u7ec4\u6210\u4e00\u4e2a\u590d\u6742\u7684\u903b\u8f91\u8868\u8fbe\u5f0f\uff0c\u4ee5\u5224\u65ad\u7a0b\u5e8f\u4e2d\u7684\u8868\u8fbe\u5f0f\u662f\u5426\u6210\u7acb\uff0c\u5224\u65ad\u7684\u7ed3\u679c\u662f true \u6216 false\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u7b26\u53f7<\/th>\n<th>\u4f5c\u7528<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>&amp;<\/td>\n<td>\u903b\u8f91\u4e0e<\/td>\n<td>a&amp;b\uff0ca\u548cb\u90fd\u662ftrue\uff0c\u7ed3\u679c\u4e3atrue\uff0c\u5426\u5219\u4e3afalse<\/td>\n<\/tr>\n<tr>\n<td>|<\/td>\n<td>\u903b\u8f91\u6216<\/td>\n<td>a|b\uff0ca\u548cb\u90fd\u662ffalse\uff0c\u7ed3\u679c\u4e3afalse\uff0c\u5426\u5219\u4e3atrue<\/td>\n<\/tr>\n<tr>\n<td>^<\/td>\n<td>\u903b\u8f91\u5f02\u6216<\/td>\n<td>a^b\uff0ca\u548cb\u7ed3\u679c\u4e0d\u540c\u4e3atrue\uff0c\u76f8\u540c\u4e3afalse<\/td>\n<\/tr>\n<tr>\n<td>!<\/td>\n<td>\u903b\u8f91\u975e<\/td>\n<td>!a\uff0c\u7ed3\u679c\u548ca\u7684\u7ed3\u679c\u6b63\u597d\u76f8\u53cd<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token comment\">\/\/\u5b9a\u4e49\u53d8\u91cf<\/span>\n<span class=\"token keyword\">int<\/span> i <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">int<\/span> j <span class=\"token operator\">=<\/span> <span class=\"token number\">20<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">int<\/span> k <span class=\"token operator\">=<\/span> <span class=\"token number\">30<\/span><span class=\"token punctuation\">;<\/span>\n\n<span class=\"token comment\">\/\/&amp; \u201c\u4e0e\u201d\uff0c\u5e76\u4e14\u7684\u5173\u7cfb\uff0c\u53ea\u8981\u8868\u8fbe\u5f0f\u4e2d\u6709\u4e00\u4e2a\u503c\u4e3afalse\uff0c\u7ed3\u679c\u5373\u4e3afalse<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&gt;<\/span> j<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&amp;<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&gt;<\/span> k<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/false &amp; false,\u8f93\u51fafalse<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&lt;<\/span> j<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&amp;<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&gt;<\/span> k<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/true &amp; false,\u8f93\u51fafalse<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&gt;<\/span> j<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&amp;<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&lt;<\/span> k<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/false &amp; true,\u8f93\u51fafalse<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&lt;<\/span> j<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&amp;<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&lt;<\/span> k<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/true &amp; true,\u8f93\u51fatrue<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"--------\"<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n\n<span class=\"token comment\">\/\/| \u201c\u6216\u201d\uff0c\u6216\u8005\u7684\u5173\u7cfb\uff0c\u53ea\u8981\u8868\u8fbe\u5f0f\u4e2d\u6709\u4e00\u4e2a\u503c\u4e3atrue\uff0c\u7ed3\u679c\u5373\u4e3atrue<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&gt;<\/span> j<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">|<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&gt;<\/span> k<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/false | false,\u8f93\u51fafalse<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&lt;<\/span> j<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">|<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&gt;<\/span> k<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/true | false,\u8f93\u51fatrue<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&gt;<\/span> j<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">|<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&lt;<\/span> k<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/false | true,\u8f93\u51fatrue<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&lt;<\/span> j<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">|<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&lt;<\/span> k<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/true | true,\u8f93\u51fatrue<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"--------\"<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n\n<span class=\"token comment\">\/\/^ \u201c\u5f02\u6216\u201d\uff0c\u76f8\u540c\u4e3afalse\uff0c\u4e0d\u540c\u4e3atrue<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&gt;<\/span> j<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">^<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&gt;<\/span> k<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/false ^ false,\u8f93\u51fafalse<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&lt;<\/span> j<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">^<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&gt;<\/span> k<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/true ^ false,\u8f93\u51fatrue<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&gt;<\/span> j<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">^<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&lt;<\/span> k<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/false ^ true,\u8f93\u51fatrue<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&lt;<\/span> j<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">^<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&lt;<\/span> k<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/true ^ true,\u8f93\u51fafalse<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"--------\"<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n\n<span class=\"token comment\">\/\/! \u201c\u975e\u201d\uff0c\u53d6\u53cd<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&gt;<\/span> j<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/false<\/span>\nSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token operator\">!<\/span><span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&gt;<\/span> j<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/!false\uff0c,\u8f93\u51fatrue<\/span>\n<\/code><\/pre>\n<h5>\u77ed\u8def\u903b\u8f91\u8fd0\u7b97\u7b26<\/h5>\n<table>\n<thead>\n<tr>\n<th>\u7b26\u53f7<\/th>\n<th>\u4f5c\u7528<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>&amp;&amp;<\/td>\n<td>\u77ed\u8def\u4e0e<\/td>\n<td>\u4f5c\u7528\u548c&amp;\u76f8\u540c\uff0c\u4f46\u662f\u6709\u77ed\u8def\u6548\u679c<\/td>\n<\/tr>\n<tr>\n<td>||<\/td>\n<td>\u77ed\u8def\u6216<\/td>\n<td>\u4f5c\u7528\u548c|\u76f8\u540c\uff0c\u4f46\u662f\u6709\u77ed\u8def\u6548\u679c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<blockquote>\n<p>\u5728\u903b\u8f91\u4e0e\u8fd0\u7b97\u4e2d\uff0c\u53ea\u8981\u6709\u4e00\u4e2a\u8868\u8fbe\u5f0f\u7684\u503c\u4e3afalse\uff0c\u90a3\u4e48\u7ed3\u679c\u5c31\u53ef\u4ee5\u5224\u5b9a\u4e3afalse\u4e86\uff0c\u6ca1\u6709\u5fc5\u8981\u5c06\u6240\u6709\u8868\u8fbe\u5f0f\u7684\u503c\u90fd\u8ba1\u7b97\u51fa\u6765\uff0c\u77ed\u8def\u4e0e\u64cd\u4f5c\u5c31\u6709\u8fd9\u6837\u7684\u6548\u679c\uff0c\u53ef\u4ee5\u63d0\u9ad8\u6548\u7387\u3002\u540c\u7406\u5728\u903b\u8f91\u6216\u8fd0\u7b97\u4e2d\uff0c\u4e00\u65e6\u53d1\u73b0\u503c\u4e3atrue\uff0c\u53f3\u8fb9\u7684\u8868\u8fbe\u5f0f\u5c06\u4e0d\u518d\u53c2\u4e0e\u8fd0\u7b97\u3002<\/p>\n<ul>\n<li>\n<p>\u903b\u8f91\u4e0e&amp;\uff0c\u65e0\u8bba\u5de6\u8fb9\u771f\u5047\uff0c\u53f3\u8fb9\u90fd\u8981\u6267\u884c\u3002<\/p>\n<\/li>\n<li>\n<p>\u77ed\u8def\u4e0e&amp;&amp;\uff0c\u5982\u679c\u5de6\u8fb9\u4e3a\u771f\uff0c\u53f3\u8fb9\u6267\u884c\uff1b\u5982\u679c\u5de6\u8fb9\u4e3a\u5047\uff0c\u53f3\u8fb9\u4e0d\u6267\u884c\u3002<\/p>\n<\/li>\n<li>\n<p>\u903b\u8f91\u6216|\uff0c\u65e0\u8bba\u5de6\u8fb9\u771f\u5047\uff0c\u53f3\u8fb9\u90fd\u8981\u6267\u884c\u3002<\/p>\n<\/li>\n<li>\n<p>\u77ed\u8def\u6216||\uff0c\u5982\u679c\u5de6\u8fb9\u4e3a\u5047\uff0c\u53f3\u8fb9\u6267\u884c\uff1b\u5982\u679c\u5de6\u8fb9\u4e3a\u771f\uff0c\u53f3\u8fb9\u4e0d\u6267\u884c\u3002<\/p>\n<\/li>\n<\/ul>\n<\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/6d3267c2624f4858a66c46d9f0833c2b.png\" =\"\" =\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" alt=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5 (https:\/\/mushiming.com\/)  \u7b2c3\u5f20\" title=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5  \u7b2c3\u5f20-\u7a46\u4e16\u660e\u535a\u5ba2\" ><\/p>\n<h4>6.6 \u4e09\u5143\u8fd0\u7b97\u7b26\uff08\u7406\u89e3\uff09<\/h4>\n<p>\u4e09\u5143\u8fd0\u7b97\u7b26\u8bed\u6cd5\u683c\u5f0f\uff1a<\/p>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\">\u5173\u7cfb\u8868\u8fbe\u5f0f <span class=\"token operator\">?<\/span> \u8868\u8fbe\u5f0f<span class=\"token number\">1<\/span> <span class=\"token operator\">:<\/span> \u8868\u8fbe\u5f0f<span class=\"token number\">2<\/span><span class=\"token punctuation\">;<\/span>\n<\/code><\/pre>\n<blockquote>\n<p>\u89e3\u91ca\uff1a\u95ee\u53f7\u524d\u9762\u7684\u4f4d\u7f6e\u662f\u5224\u65ad\u7684\u6761\u4ef6\uff0c\u5224\u65ad\u7ed3\u679c\u4e3aboolean\u578b\uff0c\u4e3atrue\u65f6\u8c03\u7528\u8868\u8fbe\u5f0f1\uff0c\u4e3afalse\u65f6\u8c03\u7528\u8868\u8fbe\u5f0f2\u3002\u5176\u903b\u8f91\u4e3a\uff1a\u5982\u679c\u6761\u4ef6\u8868\u8fbe\u5f0f\u6210\u7acb\u6216\u8005\u6ee1\u8db3\u5219\u6267\u884c\u8868\u8fbe\u5f0f1\uff0c\u5426\u5219\u6267\u884c\u7b2c\u4e8c\u4e2a\u3002<\/p>\n<\/blockquote>\n<p>\u4e3e\u4f8b\uff1a<\/p>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token keyword\">int<\/span> a <span class=\"token operator\">=<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">int<\/span> b <span class=\"token operator\">=<\/span> <span class=\"token number\">20<\/span><span class=\"token punctuation\">;<\/span>\n<span class=\"token keyword\">int<\/span> c <span class=\"token operator\">=<\/span> a <span class=\"token operator\">&gt;<\/span> b <span class=\"token operator\">?<\/span> a <span class=\"token operator\">:<\/span> b<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u5224\u65ad a&gt;b \u662f\u5426\u4e3a\u771f\uff0c\u5982\u679c\u4e3a\u771f\u53d6a\u7684\u503c\uff0c\u5982\u679c\u4e3a\u5047\uff0c\u53d6b\u7684\u503c<\/span>\n<\/code><\/pre>\n<blockquote>\n<p>\u4e09\u5143\u8fd0\u7b97\u7b26\u6848\u4f8b\uff1a<\/p>\n<p>1\u3001\u9700\u6c42\uff1a\u52a8\u7269\u56ed\u91cc\u6709\u4e24\u53ea\u8001\u864e\uff0c\u5df2\u77e5\u4e24\u53ea\u8001\u864e\u7684\u4f53\u91cd\u5206\u522b\u4e3a180kg\u3001200kg\uff0c\u8bf7\u7528\u7a0b\u5e8f\u5b9e\u73b0\u5224\u65ad\u4e24\u53ea\u8001\u864e\u7684\u4f53\u91cd\u662f\u5426\u76f8\u540c\u3002<\/p>\n<\/blockquote>\n<pre><code class=\"prism language-java\"><span class=\"token keyword\">public<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">OperatorTest01<\/span> <span class=\"token punctuation\">{ \n   <!-- --><\/span>\n\t<span class=\"token keyword\">public<\/span> <span class=\"token keyword\">static<\/span> <span class=\"token keyword\">void<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span>String<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span> args<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{ \n   <!-- --><\/span>\n\t\t<span class=\"token comment\">\/\/1\uff1a\u5b9a\u4e49\u4e24\u4e2a\u53d8\u91cf\u7528\u4e8e\u4fdd\u5b58\u8001\u864e\u7684\u4f53\u91cd\uff0c\u5355\u4f4d\u4e3akg\uff0c\u8fd9\u91cc\u4ec5\u4ec5\u4f53\u73b0\u6570\u503c\u5373\u53ef\u3002<\/span>\n\t\t<span class=\"token keyword\">int<\/span> weight1 <span class=\"token operator\">=<\/span> <span class=\"token number\">180<\/span><span class=\"token punctuation\">;<\/span>\n\t\t<span class=\"token keyword\">int<\/span> weight2 <span class=\"token operator\">=<\/span> <span class=\"token number\">200<\/span><span class=\"token punctuation\">;<\/span>\t\n\t\t<span class=\"token comment\">\/\/2\uff1a\u7528\u4e09\u5143\u8fd0\u7b97\u7b26\u5b9e\u73b0\u8001\u864e\u4f53\u91cd\u7684\u5224\u65ad\uff0c\u4f53\u91cd\u76f8\u540c\uff0c\u8fd4\u56detrue\uff0c\u5426\u5219\uff0c\u8fd4\u56defalse\u3002<\/span>\n\t\t<span class=\"token keyword\">boolean<\/span> b <span class=\"token operator\">=<\/span> weight1 <span class=\"token operator\">==<\/span> weight2 <span class=\"token operator\">?<\/span> <span class=\"token boolean\">true<\/span> <span class=\"token operator\">:<\/span> <span class=\"token boolean\">false<\/span><span class=\"token punctuation\">;<\/span>\t\n\t\t<span class=\"token comment\">\/\/3\uff1a\u8f93\u51fa\u7ed3\u679c<\/span>\n\t\tSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"b:\"<\/span> <span class=\"token operator\">+<\/span> b<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n\t<span class=\"token punctuation\">}<\/span>\n<span class=\"token punctuation\">}<\/span>\n<\/code><\/pre>\n<blockquote>\n<p>2\u3001\u9700\u6c42\uff1a\u4e00\u5ea7\u5bfa\u5e99\u91cc\u4f4f\u7740\u4e09\u4e2a\u548c\u5c1a\uff0c\u5df2\u77e5\u4ed6\u4eec\u7684\u8eab\u9ad8\u5206\u522b\u4e3a150cm\u3001210cm\u3001165cm\uff0c\u8bf7\u7528\u7a0b\u5e8f\u5b9e\u73b0\u83b7\u53d6\u8fd9\u4e09\u4e2a\u548c\u5c1a\u7684\u6700\u9ad8\u8eab\u9ad8\u3002<\/p>\n<\/blockquote>\n<pre><code class=\"prism language-java\"><span class=\"token keyword\">public<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">OperatorTest02<\/span> <span class=\"token punctuation\">{ \n   <!-- --><\/span>\n\t<span class=\"token keyword\">public<\/span> <span class=\"token keyword\">static<\/span> <span class=\"token keyword\">void<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span>String<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span> args<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{ \n   <!-- --><\/span>\n\t\t<span class=\"token comment\">\/\/1\uff1a\u5b9a\u4e49\u4e09\u4e2a\u53d8\u91cf\u7528\u4e8e\u4fdd\u5b58\u548c\u5c1a\u7684\u8eab\u9ad8\uff0c\u5355\u4f4d\u4e3acm\uff0c\u8fd9\u91cc\u4ec5\u4ec5\u4f53\u73b0\u6570\u503c\u5373\u53ef\u3002<\/span>\n\t\t<span class=\"token keyword\">int<\/span> height1 <span class=\"token operator\">=<\/span> <span class=\"token number\">150<\/span><span class=\"token punctuation\">;<\/span>\n\t\t<span class=\"token keyword\">int<\/span> height2 <span class=\"token operator\">=<\/span> <span class=\"token number\">210<\/span><span class=\"token punctuation\">;<\/span>\n\t\t<span class=\"token keyword\">int<\/span> height3 <span class=\"token operator\">=<\/span> <span class=\"token number\">165<\/span><span class=\"token punctuation\">;<\/span>\t\n\t\t<span class=\"token comment\">\/\/2\uff1a\u7528\u4e09\u5143\u8fd0\u7b97\u7b26\u83b7\u53d6\u524d\u4e24\u4e2a\u548c\u5c1a\u7684\u8f83\u9ad8\u8eab\u9ad8\u503c\uff0c\u5e76\u7528\u4e34\u65f6\u8eab\u9ad8\u53d8\u91cf\u4fdd\u5b58\u8d77\u6765\u3002<\/span>\n\t\t<span class=\"token keyword\">int<\/span> tempHeight <span class=\"token operator\">=<\/span> height1 <span class=\"token operator\">&gt;<\/span> height2 <span class=\"token operator\">?<\/span> height1 <span class=\"token operator\">:<\/span> height2<span class=\"token punctuation\">;<\/span>\t\t\n\t\t<span class=\"token comment\">\/\/3\uff1a\u7528\u4e09\u5143\u8fd0\u7b97\u7b26\u83b7\u53d6\u4e34\u65f6\u8eab\u9ad8\u503c\u548c\u7b2c\u4e09\u4e2a\u548c\u5c1a\u8eab\u9ad8\u8f83\u9ad8\u503c\uff0c\u5e76\u7528\u6700\u5927\u8eab\u9ad8\u53d8\u91cf\u4fdd\u5b58\u3002<\/span>\n\t\t<span class=\"token keyword\">int<\/span> maxHeight <span class=\"token operator\">=<\/span> tempHeight <span class=\"token operator\">&gt;<\/span> height3 <span class=\"token operator\">?<\/span> tempHeight <span class=\"token operator\">:<\/span> height3<span class=\"token punctuation\">;<\/span>\t\n\t\t<span class=\"token comment\">\/\/4\uff1a\u8f93\u51fa\u7ed3\u679c<\/span>\n\t\tSystem<span class=\"token punctuation\">.<\/span>out<span class=\"token punctuation\">.<\/span><span class=\"token function\">println<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">\"maxHeight:\"<\/span> <span class=\"token operator\">+<\/span> maxHeight<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n\t<span class=\"token punctuation\">}<\/span>\n<span class=\"token punctuation\">}<\/span>\n<\/code><\/pre>\n<h2>\ud83d\udc497. \u6570\u636e\u8f93\u5165\uff08\u5e94\u7528\uff09\ud83d\udc48<\/h2>\n<blockquote>\n<p>\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7 Scanner \u7c7b\u6765\u83b7\u53d6\u7528\u6237\u7684\u8f93\u5165\u3002\u4f7f\u7528\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/blockquote>\n<h6>1\u3001\u5bfc\u5305\u3002Scanner \u7c7b\u5728java.util\u5305\u4e0b\uff0c\u6240\u4ee5\u9700\u8981\u5c06\u8be5\u7c7b\u5bfc\u5165\u3002\u5bfc\u5305\u7684\u8bed\u53e5\u9700\u8981\u5b9a\u4e49\u5728\u7c7b\u7684\u4e0a\u9762\u3002<\/h6>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token keyword\">import<\/span> java<span class=\"token punctuation\">.<\/span>util<span class=\"token punctuation\">.<\/span>Scanner<span class=\"token punctuation\">;<\/span> \n<\/code><\/pre>\n<h6>2\u3001\u521b\u5efaScanner\u5bf9\u8c61\u3002<\/h6>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\">Scanner sc <span class=\"token operator\">=<\/span> <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">Scanner<\/span><span class=\"token punctuation\">(<\/span>System<span class=\"token punctuation\">.<\/span>in<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><span class=\"token comment\">\/\/ \u521b\u5efaScanner\u5bf9\u8c61\uff0csc\u8868\u793a\u53d8\u91cf\u540d\uff0c\u5176\u4ed6\u5747\u4e0d\u53ef\u53d8<\/span>\n<\/code><\/pre>\n<h6>3\u3001\u63a5\u6536\u6570\u636e<\/h6>\n<pre class=\"language-java prettyprint linenums\"><code class=\"prism language-java\"><span class=\"token keyword\">int<\/span> i <span class=\"token operator\">=<\/span> sc<span class=\"token punctuation\">.<\/span><span class=\"token function\">nextInt<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u8868\u793a\u5c06\u952e\u76d8\u5f55\u5165\u7684\u503c\u4f5c\u4e3aint\u6570\u8fd4\u56de\u3002<\/span>\n<\/code><\/pre>\n<p>\u793a\u4f8b\uff1a<br \/> <img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/a3cc0dcf47af4744b1c49748d7c8ee22.png\" =\"\" =\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" alt=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5 (https:\/\/mushiming.com\/)  \u7b2c4\u5f20\" title=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5  \u7b2c4\u5f20-\u7a46\u4e16\u660e\u535a\u5ba2\" ><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/6029d27f60454605a9f5660d43778a20.png\" =\"\" =\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" alt=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5 (https:\/\/mushiming.com\/)  \u7b2c5\u5f20\" title=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5  \u7b2c5\u5f20-\u7a46\u4e16\u660e\u535a\u5ba2\" ><\/p>\n<p>\u6539\u5199\u4e09\u4e2a\u548c\u5c1a\u6848\u4f8b\uff0c\u6570\u636e\u4f7f\u7528\u952e\u76d8\u5f55\u5165\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/7bccbf118f7c446bb33439ab3ae240b3.png\" =\"\" =\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" alt=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5 (https:\/\/mushiming.com\/)  \u7b2c6\u5f20\" title=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5  \u7b2c6\u5f20-\u7a46\u4e16\u660e\u535a\u5ba2\" ><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/7953cc53b26e4bb383d51008a68f2db5.png\" =\"\" =\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" alt=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5 (https:\/\/mushiming.com\/)  \u7b2c7\u5f20\" title=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5  \u7b2c7\u5f20-\u7a46\u4e16\u660e\u535a\u5ba2\" ><br \/> <img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/0018650a1552416bb1f5793b079aec12.png\" =\"\" =\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" alt=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5 (https:\/\/mushiming.com\/)  \u7b2c8\u5f20\" title=\"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5  \u7b2c8\u5f20-\u7a46\u4e16\u660e\u535a\u5ba2\" ><\/p>\n<h2>8.\u9047\u89c1Ara\u9047\u89c1\u4f60<\/h2>\n","protected":false},"excerpt":{"rendered":"Java\u5165\u95e8\u4e4b~Java\u57fa\u7840\u8bed\u6cd5Java\u5165\u95e8\u4e4b\u57fa\u7840\u8bed\u6cd5\u7bc7\uff0c\u6536\u85cf\u5b66\u8d77\u6765_java\u8bed\u6cd5","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/3748"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=3748"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/3748\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=3748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=3748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=3748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}