{"id":66038,"date":"2025-05-03T10:55:08","date_gmt":"2025-05-03T02:55:08","guid":{"rendered":"https:\/\/fwq.ai\/blog\/66038\/"},"modified":"2025-05-03T10:55:08","modified_gmt":"2025-05-03T02:55:08","slug":"java%e6%95%b0%e7%bb%84%e6%80%8e%e4%b9%88%e6%89%8d%e8%83%bd%e8%be%93%e5%87%ba%e5%9c%b0%e5%9d%80-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/66038\/","title":{"rendered":"java\u6570\u7ec4\u600e\u4e48\u624d\u80fd\u8f93\u51fa\u5730\u5740"},"content":{"rendered":"<blockquote><p>\n  java\u6570\u7ec4\u8f93\u51fa\u5730\u5740\u7684\u65b9\u6cd5\uff1a\u6570\u7ec4\u662f\u5f15\u7528\u7c7b\u578b\uff0c\u5b58\u50a8\u5143\u7d20\u5730\u5740\u3002\u8f93\u51fa\u6570\u7ec4\u5730\u5740\uff0c\u4f7f\u7528 system.out.println(arrays.tostring(array))\u3002arrays.tostring()\u5c06\u6570\u7ec4\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\uff0c\u5305\u62ec\u5730\u5740\u548c\u5143\u7d20\u503c\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202411\/14\/2024111412001889788.jpg\" class=\"aligncenter\" title=\"java\u6570\u7ec4\u600e\u4e48\u624d\u80fd\u8f93\u51fa\u5730\u5740\u63d2\u56fe\" alt=\"java\u6570\u7ec4\u600e\u4e48\u624d\u80fd\u8f93\u51fa\u5730\u5740\u63d2\u56fe\" \/><\/p>\n<p><strong>Java\u6570\u7ec4\u5982\u4f55\u8f93\u51fa\u5730\u5740<\/strong><\/p>\n<p>Java\u6570\u7ec4\u662f\u4e00\u4e2a\u5f15\u7528\u7c7b\u578b\uff0c\u5b83\u5b58\u50a8\u7684\u662f\u5143\u7d20\u7684\u5730\u5740\uff0c\u800c\u4e0d\u662f\u5143\u7d20\u672c\u8eab\u3002\u8fd9\u610f\u5473\u7740\uff0c\u5f53\u8f93\u51fa\u4e00\u4e2a\u6570\u7ec4\u65f6\uff0c\u8f93\u51fa\u7684\u5e76\u4e0d\u662f\u6570\u7ec4\u4e2d\u5143\u7d20\u7684\u503c\uff0c\u800c\u662f\u6570\u7ec4\u7684\u5730\u5740\u3002<\/p>\n<p>\u8981\u8f93\u51fa\u4e00\u4e2a\u6570\u7ec4\u7684\u5730\u5740\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\uff1a<\/p>\n<pre>System.out.println(Arrays.toString(array));<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5176\u4e2d\uff0carray \u662f\u8981\u8f93\u51fa\u7684\u6570\u7ec4\uff0cArrays \u662f\u4e00\u4e2a\u5305\u542b\u7528\u4e8e\u64cd\u4f5c\u6570\u7ec4\u7684\u5b9e\u7528\u7a0b\u5e8f\u65b9\u6cd5\u7684\u7c7b\uff0c\u800c toString \u65b9\u6cd5\u5c06\u6570\u7ec4\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u8868\u793a\u5f62\u5f0f\u3002\u8f93\u51fa\u7684\u5b57\u7b26\u4e32\u5c06\u5305\u62ec\u6570\u7ec4\u7684\u5730\u5740\u4ee5\u53ca\u6570\u7ec4\u4e2d\u6bcf\u4e2a\u5143\u7d20\u7684\u503c\u3002<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p><strong>\u793a\u4f8b<\/strong><\/p>\n<p>\u4ee5\u4e0b\u4ee3\u7801\u6f14\u793a\u4e86\u5982\u4f55\u8f93\u51fa\u6570\u7ec4\u7684\u5730\u5740\uff1a<\/p>\n<pre>int[] array = {1, 2, 3};\nSystem.out.println(Arrays.toString(array));<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8f93\u51fa\u7ed3\u679c\u5c06\u7c7b\u4f3c\u4e8e\uff1a<\/p>\n<pre>[I@7852e922<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5176\u4e2d\uff0c[I\u8868\u793a\u6570\u7ec4\u5305\u542b\u6574\u6570\u5143\u7d20\uff0c@7852e922\u662f\u6570\u7ec4\u7684\u5730\u5740\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fjava\u6570\u7ec4\u600e\u4e48\u624d\u80fd\u8f93\u51fa\u5730\u5740\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8IDCBABY\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>java\u6570\u7ec4\u8f93\u51fa\u5730\u5740\u7684\u65b9\u6cd5\uff1a\u6570\u7ec4\u662f\u5f15\u7528\u7c7b\u578b\uff0c\u5b58\u50a8\u5143\u7d20\u5730\u5740\u3002\u8f93\u51fa\u6570\u7ec4\u5730\u5740\uff0c\u4f7f\u7528 system.out.println(arrays.tostring(array))\u3002arrays.tostring()\u5c06\u6570\u7ec4\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\uff0c\u5305\u62ec\u5730\u5740\u548c\u5143\u7d20\u503c\u3002 Java\u6570\u7ec4\u5982\u4f55\u8f93\u51fa\u5730\u5740 Java\u6570\u7ec4\u662f\u4e00\u4e2a\u5f15\u7528\u7c7b\u578b\uff0c\u5b83\u5b58\u50a8\u7684\u662f\u5143\u7d20\u7684\u5730\u5740\uff0c\u800c\u4e0d\u662f\u5143\u7d20\u672c\u8eab\u3002\u8fd9\u610f\u5473\u7740\uff0c\u5f53\u8f93\u51fa\u4e00\u4e2a\u6570\u7ec4\u65f6\uff0c\u8f93\u51fa\u7684\u5e76\u4e0d\u662f\u6570\u7ec4\u4e2d\u5143\u7d20\u7684\u503c\uff0c\u800c\u662f\u6570\u7ec4\u7684\u5730\u5740\u3002 \u8981\u8f93\u51fa\u4e00\u4e2a\u6570\u7ec4\u7684\u5730\u5740\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\uff1a System.out.println(Arrays.toString(array)); \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d\uff0carray \u662f\u8981\u8f93\u51fa\u7684\u6570\u7ec4\uff0cArrays \u662f\u4e00\u4e2a\u5305\u542b\u7528\u4e8e\u64cd\u4f5c\u6570\u7ec4\u7684\u5b9e\u7528\u7a0b\u5e8f\u65b9\u6cd5\u7684\u7c7b\uff0c\u800c toString \u65b9\u6cd5\u5c06\u6570\u7ec4\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u8868\u793a\u5f62\u5f0f\u3002\u8f93\u51fa\u7684\u5b57\u7b26\u4e32\u5c06\u5305\u62ec\u6570\u7ec4\u7684\u5730\u5740\u4ee5\u53ca\u6570\u7ec4\u4e2d\u6bcf\u4e2a\u5143\u7d20\u7684\u503c\u3002 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u793a\u4f8b \u4ee5\u4e0b\u4ee3\u7801\u6f14\u793a\u4e86\u5982\u4f55\u8f93\u51fa\u6570\u7ec4\u7684\u5730\u5740\uff1a int[] array = {1, 2, 3}; System.out.println(Arrays.toString(array)); \u767b\u5f55\u540e\u590d\u5236 \u8f93\u51fa\u7ed3\u679c\u5c06\u7c7b\u4f3c\u4e8e\uff1a [I@7852e922 \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d\uff0c[I\u8868\u793a\u6570\u7ec4\u5305\u542b\u6574\u6570\u5143\u7d20\uff0c@7852e922\u662f\u6570\u7ec4\u7684\u5730\u5740\u3002 \u4ee5\u4e0a\u5c31\u662fjava\u6570\u7ec4\u600e\u4e48\u624d\u80fd\u8f93\u51fa\u5730\u5740\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8IDCBABY\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-66038","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/66038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=66038"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/66038\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=66038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=66038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=66038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}