{"id":203474,"date":"2025-05-22T13:58:00","date_gmt":"2025-05-22T05:58:00","guid":{"rendered":"https:\/\/server.hk\/cnblog\/203474\/"},"modified":"2025-05-22T13:58:00","modified_gmt":"2025-05-22T05:58:00","slug":"java%e4%b8%adaddint-int%e5%92%8caddinteger-integer%e6%96%b9%e6%b3%95%ef%bc%9a%e7%a9%b6%e7%ab%9f%e7%ae%97%e4%b8%8d%e7%ae%97%e9%87%8d%e8%bd%bd%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/203474\/","title":{"rendered":"Java\u4e2dadd(int, int)\u548cadd(Integer, Integer)\u65b9\u6cd5\uff1a\u7a76\u7adf\u7b97\u4e0d\u7b97\u91cd\u8f7d\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>Java\u4e2dadd(int, int)\u548cadd(Integer, Integer)\u65b9\u6cd5\uff1a\u7a76\u7adf\u7b97\u4e0d\u7b97\u91cd\u8f7d\uff1f<\/h1>\n<p>\u600e\u4e48\u5165\u95e8\u6587\u7ae0\u7f16\u7a0b\uff1f\u9700\u8981\u5b66\u4e60\u54ea\u4e9b\u77e5\u8bc6\u70b9\uff1f\u8fd9\u662f\u65b0\u624b\u4eec\u521a\u63a5\u89e6\u7f16\u7a0b\u65f6\u5e38\u89c1\u7684\u95ee\u9898\uff1b\u4e0b\u9762\u5c31\u6765\u7ed9\u5927\u5bb6\u6574\u7406\u5206\u4eab\u4e00\u4e9b\u77e5\u8bc6\u70b9\uff0c\u5e0c\u671b\u80fd\u591f\u7ed9\u521d\u5b66\u8005\u4e00\u4e9b\u5e2e\u52a9\u3002\u672c\u7bc7\u6587\u7ae0\u5c31\u6765\u4ecb\u7ecd\u300aJava\u4e2dadd(int, int)\u548cadd(Integer, Integer)\u65b9\u6cd5\uff1a\u7a76\u7adf\u7b97\u4e0d\u7b97\u91cd\u8f7d\uff1f\u300b\uff0c\u6d89\u53ca\u5230\uff0c\u6709\u9700\u8981\u7684\u53ef\u4ee5\u6536\u85cf\u4e00\u4e0b<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241109\/1731128629672eed3532b9f.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>Java\u4e2dadd(int, int)\u548cadd(Integer, Integer)\u65b9\u6cd5\u5173\u7cfb\u63a2\u8ba8<\/strong><\/p>\n<p>\u5728Java\u4e2d\uff0c\u540c\u4e00\u7c7b\u5185\u5b58\u5728\u4e24\u4e2a\u540c\u540d\u65b9\u6cd5add(int, int)\u548cadd(Integer, Integer)\u65f6\uff0c\u5b83\u4eec\u4e4b\u95f4\u662f\u5426\u6784\u6210\u91cd\u8f7d\u662f\u4e00\u4e2a\u503c\u5f97\u63a2\u8ba8\u7684\u95ee\u9898\u3002<\/p>\n<p><strong>\u91cd\u8f7d\u7684\u5b9a\u4e49<\/strong><\/p>\n<p>\u91cd\u8f7d\u662f\u6307\u5728\u540c\u4e00\u7c7b\u5185\uff0c\u5b58\u5728\u591a\u4e2a\u540c\u540d\u65b9\u6cd5\uff0c\u4f46\u5b83\u4eec\u5177\u6709\u4e0d\u540c\u6570\u91cf\u7684\u53c2\u6570\u6216\u4e0d\u540c\u7684\u53c2\u6570\u7c7b\u578b\u3002\u8fd9\u5141\u8bb8\u6211\u4eec\u6839\u636e\u4e0d\u540c\u7684\u53c2\u6570\u63d0\u4f9b\u4e0d\u540c\u7684\u65b9\u6cd5\u5b9e\u73b0\u3002<\/p>\n<p><strong>add(int, int)\u548cadd(Integer, Integer)\u662f\u5426\u91cd\u8f7d\uff1f<\/strong><\/p>\n<p>\u4ece\u6280\u672f\u4e0a\u8bb2\uff0c\u8fd9\u4e24\u4e2a\u65b9\u6cd5\u5e76\u4e0d\u6784\u6210\u91cd\u8f7d\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u8fd4\u56de\u7c7b\u578b\u4e0d\u540c\uff08add(int, int)\u8fd4\u56deint\uff0c\u800cadd(Integer, Integer)\u8fd4\u56devoid\uff09\u3002\u91cd\u8f7d\u7684\u6761\u4ef6\u662f\u65b9\u6cd5\u540d\u76f8\u540c\u3001\u53c2\u6570\u4e2a\u6570\u6216\u7c7b\u578b\u4e0d\u540c\uff0c\u4f46\u8fd4\u56de\u7c7b\u578b\u53ef\u4ee5\u4e0d\u76f8\u540c\u3002<\/p>\n<p><strong>\u7f16\u8bd1\u9519\u8bef\u7684\u539f\u56e0<\/strong><\/p>\n<p>\u5f53\u58f0\u660e\u4e24\u4e2a\u65b9\u6cd5add(int, int)\u548cadd(Integer, Integer)\u65f6\uff0c\u7f16\u8bd1\u5668\u4f1a\u9996\u5148\u68c0\u67e5\u662f\u5426\u6784\u6210\u91cd\u8f7d\u3002\u7531\u4e8e\u8fd9\u4e24\u4e2a\u65b9\u6cd5\u8fd4\u56de\u7c7b\u578b\u4e0d\u540c\uff0c\u6240\u4ee5\u7f16\u8bd1\u5668\u4e0d\u4f1a\u5c06\u5176\u8bc6\u522b\u4e3a\u91cd\u8f7d\u3002<\/p>\n<p><strong>\u987a\u5e8f\u67e5\u627e\u53c2\u6570\u5316\u65b9\u6cd5<\/strong><\/p>\n<p>\u5728Java\u4e2d\uff0c\u8c03\u7528\u65b9\u6cd5\u65f6\uff0c\u7f16\u8bd1\u5668\u4f1a\u9075\u5faa\u987a\u5e8f\u67e5\u627e\u7684\u539f\u5219\u3002\u5bf9\u4e8e\u53c2\u6570\u5316\u65b9\u6cd5\uff0c\u7f16\u8bd1\u5668\u4f1a\u9996\u5148\u67e5\u627e\u4f7f\u7528\u57fa\u672c\u6570\u636e\u7c7b\u578b\uff08\u5982int\uff09\u7684\u53c2\u6570\u5316\u65b9\u6cd5\u3002\u53ea\u6709\u5728\u627e\u4e0d\u5230\u57fa\u672c\u6570\u636e\u7c7b\u578b\u7684\u65b9\u6cd5\u540e\uff0c\u7f16\u8bd1\u5668\u624d\u4f1a\u67e5\u627e\u4f7f\u7528\u5c01\u88c5\u7c7b\uff08\u5982Integer\uff09\u7684\u53c2\u6570\u5316\u65b9\u6cd5\u3002<\/p>\n<p><strong>\u8c03\u7528add\u65b9\u6cd5<\/strong><\/p>\n<p>\u5982\u679c\u4f7f\u7528\u57fa\u672c\u6570\u636e\u7c7b\u578b\uff08\u5982int\uff09\u8c03\u7528add\u65b9\u6cd5\uff0c\u7f16\u8bd1\u5668\u4f1a\u4f18\u5148\u9009\u62e9add(int, int)\u3002\u5982\u679c\u4f7f\u7528\u5c01\u88c5\u7c7b\uff08\u5982Integer\uff09\u8c03\u7528add\u65b9\u6cd5\uff0c\u4e5f\u4f1a\u4f18\u5148\u9009\u62e9add(int, int)\uff0c\u56e0\u4e3a\u7ecf\u8fc7\u81ea\u52a8\u62c6\u7bb1\uff0cInteger\u53c2\u6570\u4f1a\u88ab\u8f6c\u6362\u4e3aint\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u5373\u4f7f\u8fd9\u4e24\u4e2a\u65b9\u6cd5\u90fd\u5b58\u5728\u4e8e\u540c\u4e00\u4e2a\u7c7b\u4e2d\uff0c\u5728\u5b9e\u9645\u8c03\u7528\u65f6\u4e5f\u53ea\u4f1a\u6267\u884cadd(int, int)\u65b9\u6cd5\u3002\u53ea\u6709\u5f53\u65b9\u6cd5\u53c2\u6570\u662f\u5c01\u88c5\u7c7b\uff0c\u4e14\u8fd4\u56de\u7c7b\u578b\u4e5f\u4e3a\u5c01\u88c5\u7c7b\u65f6\uff0c\u7f16\u8bd1\u5668\u624d\u4f1a\u62a5\u9519\uff0c\u8ba4\u4e3a\u8fd9\u4e24\u4e2a\u65b9\u6cd5\u662f\u76f8\u540c\u7684\u65b9\u6cd5\u3002<\/p>\n<p>\u4eca\u5929\u5173\u4e8e\u300aJava\u4e2dadd(int, int)\u548cadd(Integer, Integer)\u65b9\u6cd5\uff1a\u7a76\u7adf\u7b97\u4e0d\u7b97\u91cd\u8f7d\uff1f\u300b\u7684\u5185\u5bb9\u5c31\u4ecb\u7ecd\u5230\u8fd9\u91cc\u4e86\uff0c\u662f\u4e0d\u662f\u5b66\u8d77\u6765\u4e00\u76ee\u4e86\u7136\uff01\u60f3\u8981\u4e86\u89e3\u66f4\u591a\u5173\u4e8e\u7684\u5185\u5bb9\u8bf7\u5173\u6ce8\u516c\u4f17\u53f7\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java\u4e2dadd(int, in&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-203474","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/203474","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=203474"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/203474\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=203474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=203474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=203474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}