{"id":137,"date":"2016-09-09T14:38:25","date_gmt":"2016-09-09T06:38:25","guid":{"rendered":"http:\/\/jason19659.pw\/?p=137"},"modified":"2016-09-09T14:40:18","modified_gmt":"2016-09-09T06:40:18","slug":"2013%e5%b9%b4%e6%80%bb%e7%bb%93%e7%9a%84java%e9%87%8c%e7%9a%84%e5%9d%91","status":"publish","type":"post","link":"https:\/\/t2t2.cc\/?p=137","title":{"rendered":"2013\u5e74\u603b\u7ed3\u7684java\u91cc\u7684\u5751"},"content":{"rendered":"<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n\r\n1 \u5173\u4e8eInteger int\r\nInteger t1 = 111;\r\nInteger t2 = 111;\r\nInteger t3 = new Integer(111);\r\nInteger t4 = Integer.valueOf(111);\r\nInteger s1 = 222;\r\nInteger s2 = 222;\r\nInteger s3 = new Integer(222);\r\nInteger s4 = Integer.valueOf(222);\r\nSystem.out.println(t1 == t2); \/\/true\r\nSystem.out.println(t1 == t3); \/\/false\r\nSystem.out.println(t1 == t4); \/\/true\r\nSystem.out.println(s1 == s2); \/\/false\r\nSystem.out.println(s1 == s3); \/\/false\r\nSystem.out.println(s1 == s4); \/\/false\r\n\r\n2 String\r\nString a = &quot;JAVA&quot;;\r\nString b = &quot;JAVA&quot;;\r\nString c = new String(&quot;JAVA&quot;);\r\nString d = &quot;JA&quot;;\r\nString e = &quot;VA&quot;;\r\nString f = &quot;JA&quot;+&quot;VA&quot;;\r\nString g = d+e;\r\nString h = c ;\r\nSystem.out.println(a==b); \/\/true\r\nSystem.out.println(a==c); \/\/false\r\nSystem.out.println(a==f); \/\/true\r\nSystem.out.println(a==g); \/\/false\r\nSystem.out.println(c==f); \/\/false\r\nSystem.out.println(c==g); \/\/false\r\nSystem.out.println(c==h); \/\/true\r\n3.\u6570\u7ec4,=\r\nint a=0;\r\nint b&#x5B;]=new int&#x5B;5];\r\nint c=3;\r\nb&#x5B;a]=a=c;\r\nSystem.out.println(b&#x5B;0] + &quot; &quot; + b&#x5B;3]); \/\/3 0\r\n4 static\r\nstatic {\r\nname = &quot;B&quot;;\r\n}\r\nstatic String name = &quot;A&quot;;\r\nstatic {\r\nSystem.out.println(name); \/\/A\r\n}\r\n\u8f93\u51fa\u7684name \u662f\u4ec0\u4e48\u5462?\r\n5.short\r\nshort a = 1;\r\na = a ++;\/\/\u4f1a\u62a5\u9519\u5417? \u4e0d\u4f1a\r\nshort a = 1;\r\na = a + 1;\/\/\u4f1a\u62a5\u9519\u5417? \u4f1a\r\nshort a = 1;\r\na += 1;\/\/ \u4f1a\u62a5\u9519\u5417? \u4e0d\u4f1a\r\n\r\n<\/pre>\n<p>\u539f\u5730\u5740<a href=\"http:\/\/user.qzone.qq.com\/243404061\/2\">http:\/\/user.qzone.qq.com\/243404061\/2<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1 \u5173\u4e8eInteger int Integer t1 = 111; Integer t2 = 111; Int&hellip; <a href=\"https:\/\/t2t2.cc\/?p=137\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/t2t2.cc\/index.php?rest_route=\/wp\/v2\/posts\/137"}],"collection":[{"href":"https:\/\/t2t2.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/t2t2.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/t2t2.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/t2t2.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=137"}],"version-history":[{"count":4,"href":"https:\/\/t2t2.cc\/index.php?rest_route=\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":141,"href":"https:\/\/t2t2.cc\/index.php?rest_route=\/wp\/v2\/posts\/137\/revisions\/141"}],"wp:attachment":[{"href":"https:\/\/t2t2.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/t2t2.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/t2t2.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}