{"id":979,"date":"2017-12-27T15:08:36","date_gmt":"2017-12-27T07:08:36","guid":{"rendered":"http:\/\/www.netxintai.com\/?p=979"},"modified":"2024-11-16T21:44:28","modified_gmt":"2024-11-16T13:44:28","slug":"java%e5%9f%ba%e7%a1%80%e8%af%ad%e6%b3%95%e4%ba%8c-%e6%95%b0%e6%8d%ae%e7%b1%bb%e5%9e%8b","status":"publish","type":"post","link":"https:\/\/www.netxintai.com\/?p=979","title":{"rendered":"Java\u57fa\u7840\u8bed\u6cd5(\u4e8c)&#8211;\u6570\u636e\u7c7b\u578b"},"content":{"rendered":"<p style=\"margin-top: 0pt; margin-bottom: 0pt; direction: ltr; unicode-bidi: embed; vertical-align: baseline;\"><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 20px; color: rgb(255, 0, 0);\"><strong>&nbsp;&nbsp;&nbsp;&nbsp;<\/strong>&nbsp;&nbsp;&nbsp;<span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; color: rgb(255, 0, 0); font-size: 24px;\">&nbsp;Java\u8bed\u8a00\u662f\u5f3a\u7c7b\u578b\u8bed\u8a00\uff0c\u5bf9\u4e8e\u6bcf\u4e00\u79cd\u6570\u636e\u90fd\u5b9a\u4e49\u4e86\u660e\u786e\u7684\u5177\u4f53\u6570\u636e\u7c7b\u578b\uff0c\u5728\u5185\u5b58\u603b\u5206\u914d\u4e86\u4e0d\u540c\u5927\u5c0f\u7684\u5185\u5b58\u7a7a\u95f4<\/span><\/span><\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" loading=\"lazy\" src=\"\/ueditor\/php\/upload\/image\/20171227\/1514355303508451.png\" title=\"1514355303508451.png\" alt=\"\u56fe\u72471.png\" width=\"998\" height=\"442\" style=\"width: 998px; height: 442px;\"\/><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(255, 0, 0); font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px;\">&nbsp;&nbsp;<span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; color: rgb(255, 0, 0); background-color: rgb(255, 255, 255);\">Java\u4e2d\u4e3b\u8981\u67098\u4e2d\u57fa\u672c\u6570\u636e\u7c7b\u578b\uff0c<span style=\"background-color: rgb(255, 255, 255); font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px; color: rgb(255, 0, 0);\">\u516d\u79cd\u6570\u5b57\u7c7b\u578b\uff08\u56db\u4e2a\u6574\u6570\u578b\uff0c\u4e24\u4e2a\u6d6e\u70b9\u578b\uff09\uff0c\u4e00\u79cd\u5b57\u7b26\u7c7b\u578b\uff0c\u8fd8\u6709\u4e00\u79cd\u5e03\u5c14\u578b\u3002<\/span>\u5206\u522b\u662f:byte&nbsp; short&nbsp; int&nbsp; long&nbsp; float&nbsp; double&nbsp;<span style=\"color: rgb(255, 0, 0); font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px; background-color: rgb(255, 255, 255);\">&nbsp;char&nbsp;&nbsp;<span style=\"color: rgb(255, 0, 0); font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px; background-color: rgb(255, 255, 255);\">boolean.<\/span><\/span><\/span><\/span><\/p>\n<p><span style=\"color: rgb(255, 0, 0); font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px; background-color: rgb(255, 255, 255);\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px; background-color: rgb(255, 255, 255); color: rgb(31, 73, 125);\">&nbsp;Java\u4e2d\u6240\u6709\u7684\u57fa\u672c\u6570\u636e\u7c7b\u578b\u90fd\u6709\u56fa\u5b9a\u7684\u5b58\u50a8\u8303\u56f4\u548c\u6240\u5360\u5185\u5b58\u7a7a\u95f4\u7684\u5927\u5c0f\uff0c\u800c\u4e0d\u53d7\u5177\u4f53\u64cd\u4f5c\u7cfb\u7edf\u7684\u5f71\u54cd\uff0c\u6765\u4fdd\u8bc1Java\u7a0b\u5e8f\u7684\u53ef\u79fb\u690d\u6027\u3002\u6574\u5f62\u6570\u636e\u9ed8\u8ba4\u4e3aint\u6570\u636e\u7c7b\u578b\uff0c\u6d6e\u70b9\u578b\u9ed8\u8ba4\u4e3adouble\u6570\u636e\u7c7b\u578b\uff0c\u5982\u679c\u8981\u8868\u793along\u578b\u6570\u636e\u6216float\u578b\u6570\u636e\uff0c\u8981\u5728\u76f8\u5e94\u7684\u6570\u503c\u540e\u9762\u52a0\u4e0al\u3001L\u6216f\u3001F\uff0c\u5426\u5219\u4f1a\u51fa\u73b0\u7f16\u8bd1\u95ee\u9898\u3002<\/span><\/span><\/p>\n<p><\/p>\n<table cellspacing=\"0\" border=\"1\" bordercolor=\"RED\" align=\"center\">\n<tbody>\n<tr height=\"18\" class=\"firstRow\">\n<td width=\"72\" height=\"18\" align=\"center\" valign=\"middle\" style=\"word-break: break-all;\">\u7c7b\u578b<\/td>\n<td width=\"122\" align=\"center\" valign=\"middle\">\u5360\u7528\u5b58\u50a8\u7a7a\u95f4<\/td>\n<td width=\"406\" align=\"center\" valign=\"middle\">\u8868\u8ff0\u8303\u56f4<\/td>\n<\/tr>\n<tr height=\"18\">\n<td height=\"18\" align=\"center\" valign=\"middle\">byte<\/td>\n<td align=\"center\" valign=\"middle\">1\u5b57\u8282<\/td>\n<td align=\"center\" valign=\"middle\">-128\u81f3127<\/td>\n<\/tr>\n<tr height=\"18\">\n<td height=\"18\" align=\"center\" valign=\"middle\">short<\/td>\n<td align=\"center\" valign=\"middle\">2\u5b57\u8282<\/td>\n<td align=\"center\" valign=\"middle\">-2^15 \u81f3 2^15 &#8211; 1<\/td>\n<\/tr>\n<tr height=\"18\">\n<td height=\"18\" align=\"center\" valign=\"middle\">int<\/td>\n<td align=\"center\" valign=\"middle\">4\u5b57\u8282<\/td>\n<td align=\"center\" valign=\"middle\">-2^31&nbsp;\u81f3 2^31 &#8211; 1<\/td>\n<\/tr>\n<tr height=\"18\">\n<td height=\"18\" align=\"center\" valign=\"middle\">long<\/td>\n<td align=\"center\" valign=\"middle\">5\u5b57\u8282<\/td>\n<td align=\"center\" valign=\"middle\">-2^63&nbsp;\u81f3 2^63 -1<\/td>\n<\/tr>\n<tr height=\"18\">\n<td height=\"18\" align=\"center\" valign=\"middle\">float<\/td>\n<td align=\"center\" valign=\"middle\">4\u5b57\u8282<\/td>\n<td align=\"center\" valign=\"middle\">-3.403E38 \u81f3 3.403E38<\/td>\n<\/tr>\n<tr height=\"18\">\n<td height=\"18\" align=\"center\" valign=\"middle\">double<\/td>\n<td align=\"center\" valign=\"middle\">8\u5b57\u8282<\/td>\n<td align=\"center\" valign=\"middle\">-1.78E308 <strong>\u81f3 <\/strong>1.798E308<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px; color: rgb(247, 150, 70);\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boolean\uff1a\u6570\u636e\u503c\u53ea\u6709true\u6216false\uff0c\u9002\u7528\u4e8e\u903b\u8f91\u8ba1\u7b97\u3002<\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px; color: rgb(247, 150, 70);\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;char\uff1achar\u578b\uff08\u5b57\u7b26\u578b\uff09\u6570\u636e\u5728\u5185\u5b58\u4e2d\u5360\u75282\u4e2a\u5b57\u8282\u3002char\u578b\u6570\u636e\u7528\u6765\u8868\u793a\u901a\u5e38\u610f\u4e49\u4e0a\u7684\u5b57\u7b26\uff0c\u6bcf\u4e2a\u5b57\u7b26\u53602\u4e2a\u5b57\u8282\uff0cJava\u5b57\u7b26\u91c7\u7528Unicode\u7f16\u7801\uff0c\u5b83\u7684\u524d128\u5b57\u8282\u7f16\u7801\u4e0eASCII\u517c\u5bb9\u5b57\u7b26\u7684\u5b58\u50a8\u8303\u56f4\u5728\\u0000~\\uFFFF\uff0c\u5728\u5b9a\u4e49\u5b57\u7b26\u578b\u7684\u6570\u636e\u65f6\u5019\u8981\u6ce8\u610f\u52a0&#39; &#39;\uff0c\u6bd4\u5982 &#39;1&#39;\u8868\u793a\u5b57\u7b26&#39;1&#39;\u800c\u4e0d\u662f\u6570\u503c1\u3002<\/span><\/p>\n<p><strong><span style=\"font-size: 36px; color: rgb(255, 0, 0); font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;;\">\u57fa\u672c\u6570\u636e\u7c7b\u578b\u95f4\u7684\u8f6c\u6362<\/span><\/strong><\/p>\n<p><strong><span style=\"font-size: 36px; color: rgb(255, 0, 0); font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;;\">&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(255, 0, 0); font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px;\"><\/span><\/span><\/strong><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; color: rgb(192, 80, 77); font-size: 24px;\">1\u3001boolean\u7c7b\u578b\u4e0d\u80fd\u8f6c\u6362\u6210\u4efb\u4f55\u5176\u4ed6\u6570\u636e\u7c7b\u578b\u3002<\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px;\">&nbsp;&nbsp;&nbsp;<span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; color: rgb(192, 80, 77);\">&nbsp;&nbsp;&nbsp;2\u3001\u81ea\u52a8\u7c7b\u578b\u8f6c\u6362\uff1a\u5bb9\u91cf\u5c0f\u7684\u6570\u636e\u7c7b\u578b\u53ef\u4ee5\u81ea\u52a8\u8f6c\u6362\u6210\u5bb9\u91cf\u5927\u7684\u6570\u636e\u7c7b\u578b<\/span><\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px;\"><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; color: rgb(192, 80, 77);\"><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;byte,short,char\u2014int\u2014long\u2014float\u2014double&nbsp;<\/span><\/span><\/span><\/p>\n<p><span style=\"color: rgb(192, 80, 77); font-size: 31px; font-family: Arial;\"><span style=\"font-size: 31px;font-family: Arial\">&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: rgb(192, 80, 77); font-size: 24px; font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;;\"><span style=\"color: rgb(192, 80, 77); font-size: 24px;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;byte,short,char<\/span><span style=\"color: rgb(192, 80, 77); font-size: 24px;\">\u76f8\u4e92\u4e4b\u95f4\u8865\u8f6c\u6362\uff0c\u4ed6\u4eec\u53c2\u4e0e\u8fd0\u7b97\u9996\u5148\u8f6c\u6362\u4e3a<\/span><span style=\"color: rgb(192, 80, 77); font-size: 24px;\">int<\/span><span style=\"color: rgb(192, 80, 77); font-size: 24px;\">\u7c7b\u578b<\/span><\/span><\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px;\"><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px; color: rgb(192, 80, 77);\">&nbsp; &nbsp; &nbsp;&nbsp;3\u3001\u5f3a\u5236\u7c7b\u578b\u8f6c\u6362\uff1a\u5bb9\u91cf\u5927\u7684\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u6210\u5bb9\u91cf\u5c0f\u7684\u6570\u636e\u7c7b\u578b\u65f6\uff0c\u8981\u52a0\u4e0a\u5f3a\u5236\u8f6c\u6362\u7b26\uff0c\u4f46\u8fd9\u6837\u6709\u53ef\u80fd\u4f1a\u9020\u6210\u7cbe\u5ea6\u964d\u4f4e\u6216\u8005\u6570\u636e\u6ea2\u51fa\uff0c\u8981\u5c0f\u5fc3\u3002<\/span><\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px; color: rgb(192, 80, 77);\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u8f6c\u6362\u516c\u5f0f\uff1a<\/span><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1, &quot;Microsoft YaHei&quot;; font-size: 24px; color: rgb(0, 176, 240);\">\u76ee\u6807\u7c7b\u578b \u53d8\u91cf\u540d=(\u76ee\u6807\u7c7b\u578b)(\u88ab\u8f6c\u6362\u7684\u6570\u636e)<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Java\u8bed\u8a00\u662f <span class=\"ellipsis\">&hellip;<\/span> <span class=\"more-link-wrap\"><a href=\"https:\/\/www.netxintai.com\/?p=979\" class=\"more-link\"><span>Read More &rarr;<\/span><\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[111,110,112],"_links":{"self":[{"href":"https:\/\/www.netxintai.com\/index.php?rest_route=\/wp\/v2\/posts\/979"}],"collection":[{"href":"https:\/\/www.netxintai.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.netxintai.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.netxintai.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.netxintai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=979"}],"version-history":[{"count":2,"href":"https:\/\/www.netxintai.com\/index.php?rest_route=\/wp\/v2\/posts\/979\/revisions"}],"predecessor-version":[{"id":2804,"href":"https:\/\/www.netxintai.com\/index.php?rest_route=\/wp\/v2\/posts\/979\/revisions\/2804"}],"wp:attachment":[{"href":"https:\/\/www.netxintai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.netxintai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.netxintai.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}