{"id":86799,"date":"2026-07-29T09:24:40","date_gmt":"2026-07-29T01:24:40","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/86799.html"},"modified":"2026-07-29T09:24:40","modified_gmt":"2026-07-29T01:24:40","slug":"%e9%98%bf%e9%87%8c%e9%9d%a2%e8%af%95%e5%ae%98%e5%bf%85%e9%97%ae%ef%bc%9ahashmap%e5%ba%95%e5%b1%82%e5%8e%9f%e7%90%86%e5%8f%8a%e6%89%a9%e5%ae%b9%e6%9c%ba%e5%88%b6%ef%bc%8190%e5%bc%80%e5%8f%91%e8%80%85","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/86799.html","title":{"rendered":"\u963f\u91cc\u9762\u8bd5\u5b98\u5fc5\u95ee\uff1aHashMap\u5e95\u5c42\u539f\u7406\u53ca\u6269\u5bb9\u673a\u5236\uff0190%\u5f00\u53d1\u8005\u90fd\u8bf4\u4e0d\u5168\uff01"},"content":{"rendered":"<h2>\u963f\u91cc\u9762\u8bd5\u5b98\u5fc5\u95ee&#xff1a;HashMap\u5e95\u5c42\u539f\u7406\u53ca\u6269\u5bb9\u673a\u5236&#xff01;90%\u5f00\u53d1\u8005\u90fd\u8bf4\u4e0d\u5168&#xff01;<\/h2>\n<h3>\u524d\u8a00<\/h3>\n<p>Java \u96c6\u5408\u9762\u8bd5\u5fc5\u8003\u5929\u82b1\u677f&#xff0c;\u4e00\u5b9a\u662f HashMap \u5e95\u5c42\u539f\u7406 &#043; \u6269\u5bb9\u673a\u5236\u3002<\/p>\n<p>\u51e0\u4e4e\u6240\u6709 Java \u540e\u7aef\u9762\u8bd5&#xff0c;\u4e00\u9762\u5fc5\u95ee&#xff1a;<br \/>\nHashMap \u5e95\u5c42\u662f\u4ec0\u4e48\u7ed3\u6784&#xff1f;\u54c8\u5e0c\u51b2\u7a81\u600e\u4e48\u89e3\u51b3&#xff1f;\u4ec0\u4e48\u65f6\u5019\u6269\u5bb9&#xff1f;\u6269\u5bb9\u6d41\u7a0b\u662f\u4ec0\u4e48&#xff1f;\u4e3a\u4ec0\u4e48\u662f 2 \u7684\u5e42&#xff1f;<\/p>\n<p>\u5f88\u591a\u4eba\u53ea\u4f1a\u80cc \u6570\u7ec4&#043;\u94fe\u8868&#043;\u7ea2\u9ed1\u6811&#xff0c;\u4e00\u65e6\u95ee\u5230 \u6269\u5bb9\u65f6\u673a\u3001\u9608\u503c\u8ba1\u7b97\u3001rehash \u673a\u5236\u3001\u6811\u5316\u6761\u4ef6 \u76f4\u63a5\u5d29\u76d8\u3002<\/p>\n<p>\u672c\u7bc7\u4e00\u6b21\u6027\u8bb2\u900f JDK1.8 HashMap \u5b8c\u6574\u5e95\u5c42\u539f\u7406\u3001\u54c8\u5e0c\u51b2\u7a81\u89e3\u51b3\u3001\u6811\u5316\u89c4\u5219\u3001\u5b8c\u6574\u6269\u5bb9\u673a\u5236&#xff0c;\u9762\u8bd5\u76f4\u63a5\u6ee1\u5206\u80cc\u8bf5\u3002<\/p>\n<h3>\u4e00\u3001HashMap \u5e95\u5c42\u6570\u636e\u7ed3\u6784&#xff08;JDK1.8&#xff09;<\/h3>\n<p>\u5e95\u5c42\u7ed3\u6784&#xff1a;\u6570\u7ec4 &#043; \u94fe\u8868 &#043; \u7ea2\u9ed1\u6811<\/p>\n<li>\u4e3b\u4f53&#xff1a;\u54c8\u5e0c\u6570\u7ec4&#xff08;table&#xff09;&#xff0c;\u5b58\u653e\u6876<\/li>\n<li>\u51b2\u7a81\u5c11\u65f6&#xff1a;\u6876\u4e0b\u6302 \u5355\u5411\u94fe\u8868<\/li>\n<li>\u51b2\u7a81\u591a\u65f6&#xff1a;\u94fe\u8868\u957f\u5ea6 \u22658 \u4e14\u6570\u7ec4\u957f\u5ea6 \u226564 \u2192 \u8f6c\u4e3a\u7ea2\u9ed1\u6811<\/li>\n<li>\u7ea2\u9ed1\u6811\u8282\u70b9\u53d8\u5c11 \u2192 \u9000\u5316\u4e3a\u94fe\u8868<\/li>\n<p>\u76ee\u7684&#xff1a;<\/p>\n<ul>\n<li>\u94fe\u8868&#xff1a;\u89e3\u51b3\u54c8\u5e0c\u51b2\u7a81<\/li>\n<li>\u7ea2\u9ed1\u6811&#xff1a;\u964d\u4f4e\u9ad8\u51b2\u7a81\u4e0b\u67e5\u8be2\u65f6\u95f4\u590d\u6742\u5ea6&#xff08;O(n) \u2192 O(logn)&#xff09;<\/li>\n<\/ul>\n<h3>\u4e8c\u3001HashMap \u6838\u5fc3\u5c5e\u6027<\/h3>\n<p>\u5bb9\u91cf capacity&#xff1a;\u9ed8\u8ba4 16&#xff0c;\u5fc5\u987b\u662f 2 \u7684\u5e42<br \/>\n\u8d1f\u8f7d\u56e0\u5b50 loadFactor&#xff1a;\u9ed8\u8ba4 0.75<br \/>\n\u6269\u5bb9\u9608\u503c threshold &#061; capacity * 0.75<\/p>\n<p>\u89e6\u53d1\u6269\u5bb9\u6761\u4ef6&#xff1a;\u5143\u7d20\u6570\u91cf size &gt; threshold<\/p>\n<h3>\u4e09\u3001HashMap \u63d2\u5165\u6d41\u7a0b&#xff08;\u9762\u8bd5\u5fc5\u80cc&#xff09;<\/h3>\n<li>\u901a\u8fc7 hash() \u8ba1\u7b97 key \u54c8\u5e0c\u503c<\/li>\n<li>(n-1) &amp; hash \u5b9a\u4f4d\u6570\u7ec4\u4e0b\u6807<\/li>\n<li>\u5982\u679c\u5f53\u524d\u6876\u4e3a\u7a7a \u2192 \u76f4\u63a5\u653e\u5165<\/li>\n<li>\u5982\u679c\u6876\u4e0d\u4e3a\u7a7a&#xff1a;\n<ul>\n<li>key \u76f8\u540c \u2192 \u8986\u76d6 value<\/li>\n<li>key \u4e0d\u540c \u2192 \u53d1\u751f\u54c8\u5e0c\u51b2\u7a81&#xff0c;\u6302\u94fe\u8868<\/li>\n<\/ul>\n<\/li>\n<li>\u94fe\u8868\u957f\u5ea6 \u22658&#xff0c;\u6570\u7ec4\u957f\u5ea6\u226564 \u2192 \u6811\u5316\u4e3a\u7ea2\u9ed1\u6811<\/li>\n<li>\u6dfb\u52a0\u6210\u529f\u540e\u5224\u65ad size &amp;gt; threshold \u2192 \u89e6\u53d1\u6269\u5bb9<\/li>\n<h3>\u56db\u3001\u54c8\u5e0c\u51b2\u7a81\u89e3\u51b3\u65b9\u5f0f<\/h3>\n<p>JDK1.7&#xff1a;\u7eaf\u94fe\u8868 &#043; \u5934\u63d2\u6cd5<br \/>\nJDK1.8&#xff1a;\u94fe\u8868&#043;\u7ea2\u9ed1\u6811 &#043; \u5c3e\u63d2\u6cd5<\/p>\n<p>\u4f18\u5316\u70b9&#xff1a;<\/p>\n<ul>\n<li>\u5c3e\u63d2\u6cd5\u907f\u514d\u5faa\u73af\u94fe\u8868\u6b7b\u5faa\u73af\u95ee\u9898<\/li>\n<li>\u6811\u5316\u5927\u5e45\u63d0\u9ad8\u67e5\u8be2\u6548\u7387<\/li>\n<\/ul>\n<h3>\u4e94\u3001\u6811\u5316\u4e0e\u9000\u5316\u89c4\u5219&#xff08;\u9ad8\u9891\u8003\u70b9&#xff09;<\/h3>\n<h4>\u6811\u5316\u6761\u4ef6&#xff08;\u540c\u65f6\u6ee1\u8db3&#xff09;<\/h4>\n<li>\u94fe\u8868\u957f\u5ea6 \u2265 8<\/li>\n<li>\u6570\u7ec4\u5bb9\u91cf \u2265 64<\/li>\n<h4>\u9000\u5316\u6761\u4ef6<\/h4>\n<p>\u7ea2\u9ed1\u6811\u8282\u70b9\u6570\u91cf \u2264 6 \u2192 \u9000\u5316\u6210\u94fe\u8868<\/p>\n<h3>\u516d\u3001HashMap \u6269\u5bb9\u673a\u5236&#xff08;\u6838\u5fc3\u91cd\u70b9&#xff09;<\/h3>\n<h4>1. \u4ec0\u4e48\u65f6\u5019\u6269\u5bb9&#xff1f;<\/h4>\n<p>\u5f53 \u5143\u7d20\u4e2a\u6570 size &gt; \u9608\u503c threshold \u65f6\u89e6\u53d1\u6269\u5bb9\u3002<\/p>\n<h4>2. \u6269\u5bb9\u89c4\u5219<\/h4>\n<ul>\n<li>\u65b0\u5bb9\u91cf &#061; \u539f\u5bb9\u91cf \u00d7 2&#xff08;\u6c38\u8fdc\u4fdd\u6301 2 \u7684\u5e42&#xff09;<\/li>\n<li>\u65b0\u9608\u503c &#061; \u539f\u9608\u503c \u00d7 2<\/li>\n<\/ul>\n<h4>3. \u6269\u5bb9\u6838\u5fc3\u6d41\u7a0b rehash<\/h4>\n<li>\u521b\u5efa\u4e00\u4e2a\u5bb9\u91cf\u7ffb\u500d\u7684\u65b0\u6570\u7ec4<\/li>\n<li>\u904d\u5386\u539f\u6570\u7ec4\u6240\u6709\u6876<\/li>\n<li>\u5c06\u6876\u5185\u5143\u7d20\u91cd\u65b0\u8ba1\u7b97\u54c8\u5e0c\u4f4d\u7f6e\u8fc1\u79fb\u5230\u65b0\u6570\u7ec4<\/li>\n<h4>4. JDK1.8 \u6269\u5bb9\u8d85\u7ea7\u4f18\u5316&#xff08;\u9762\u8bd5\u52a0\u5206\u9879&#xff09;<\/h4>\n<p>\u5143\u7d20\u5728\u65b0\u6570\u7ec4\u53ea\u6709\u4e24\u79cd\u4f4d\u7f6e&#xff1a;<\/p>\n<ul>\n<li>\u539f\u4f4d\u7f6e\u4e0d\u53d8<\/li>\n<li>\u539f\u4f4d\u7f6e &#043; \u65e7\u5bb9\u91cf<\/li>\n<\/ul>\n<p>\u4e0d\u9700\u8981\u91cd\u65b0 hash&#xff0c;\u53ea\u9700\u8981\u5224\u65ad hash &amp; \u65e7\u5bb9\u91cf \u662f\u5426\u4e3a 0&#xff0c;\u6781\u5927\u63d0\u5347\u6269\u5bb9\u6548\u7387\u3002<\/p>\n<h3>\u4e03\u3001\u4e3a\u4ec0\u4e48\u5bb9\u91cf\u5fc5\u987b\u662f 2 \u7684\u5e42&#xff1f;<\/h3>\n<li>\u4e3a\u4e86 (n-1) &amp; hash \u5747\u5300\u53d6\u6a21&#xff0c;\u51cf\u5c11\u54c8\u5e0c\u51b2\u7a81<\/li>\n<li>\u6269\u5bb9\u65f6\u53ef\u4ee5\u5feb\u901f\u5224\u65ad\u5143\u7d20\u65b0\u4f4d\u7f6e&#xff0c;\u65e0\u9700\u91cd\u7b97 hash<\/li>\n<li>\u4fdd\u8bc1\u54c8\u5e0c\u5206\u5e03\u5747\u5300&#xff0c;\u6027\u80fd\u6700\u4f18<\/li>\n<h3>\u516b\u3001\u4e3a\u4ec0\u4e48\u8d1f\u8f7d\u56e0\u5b50\u662f 0.75&#xff1f;<\/h3>\n<ul>\n<li>\u8d1f\u8f7d\u56e0\u5b50\u592a\u5927&#xff1a;\u6570\u7ec4\u592a\u6ee1&#xff0c;\u51b2\u7a81\u591a\u3001\u6811\u5316\u591a\u3001\u67e5\u8be2\u6162<\/li>\n<li>\u8d1f\u8f7d\u56e0\u5b50\u592a\u5c0f&#xff1a;\u6570\u7ec4\u592a\u7a7a&#xff0c;\u7a7a\u95f4\u6d6a\u8d39\u4e25\u91cd<\/li>\n<\/ul>\n<p>0.75 \u662f\u65f6\u95f4\u3001\u7a7a\u95f4\u3001\u51b2\u7a81\u6982\u7387\u7684\u6700\u4f73\u5e73\u8861\u503c\u3002<\/p>\n<h3>\u4e5d\u3001\u9762\u8bd5\u6ee1\u5206\u6807\u51c6\u56de\u7b54&#xff08;\u76f4\u63a5\u80cc\u8bf5&#xff09;<\/h3>\n<p>HashMap \u5728 JDK1.8 \u5e95\u5c42\u91c7\u7528 \u6570\u7ec4&#043;\u94fe\u8868&#043;\u7ea2\u9ed1\u6811 \u7ed3\u6784\u3002<br \/>\n\u901a\u8fc7 key \u7684\u54c8\u5e0c\u503c\u5b9a\u4f4d\u6570\u7ec4\u4e0b\u6807&#xff0c;\u89e3\u51b3\u54c8\u5e0c\u51b2\u7a81\u91c7\u7528\u94fe\u5730\u5740\u6cd5\u3002<br \/>\n\u5f53\u94fe\u8868\u957f\u5ea6\u5927\u4e8e\u7b49\u4e8e8\u4e14\u6570\u7ec4\u5bb9\u91cf\u5927\u4e8e\u7b49\u4e8e64\u65f6\u94fe\u8868\u6811\u5316\u4e3a\u7ea2\u9ed1\u6811&#xff0c;\u8282\u70b9\u5c0f\u4e8e\u7b49\u4e8e6\u9000\u5316\u4e3a\u94fe\u8868\u3002<\/p>\n<p>HashMap \u9ed8\u8ba4\u5bb9\u91cf16&#xff0c;\u8d1f\u8f7d\u56e0\u5b500.75&#xff0c;\u6269\u5bb9\u9608\u503c\u4e3a\u5bb9\u91cf\u4e58\u4ee5\u8d1f\u8f7d\u56e0\u5b50\u3002\u5f53\u5143\u7d20\u6570\u91cf\u8d85\u8fc7\u9608\u503c\u89e6\u53d1\u6269\u5bb9&#xff0c;\u5bb9\u91cf\u7ffb\u500d\u3002<br \/>\nJDK1.8 \u6269\u5bb9\u4e0d\u9700\u8981\u91cd\u65b0\u8ba1\u7b97\u54c8\u5e0c&#xff0c;\u5143\u7d20\u53ea\u5728\u539f\u4f4d\u7f6e\u6216\u539f\u4f4d\u7f6e&#043;\u65e7\u5bb9\u91cf&#xff0c;\u5927\u5e45\u63d0\u5347\u6269\u5bb9\u6548\u7387\u3002<\/p>\n<p>\u5bb9\u91cf\u8bbe\u8ba1\u4e3a2\u7684\u5e42\u662f\u4e3a\u4e86\u54c8\u5e0c\u53d6\u6a21\u66f4\u5747\u5300\u3001\u6269\u5bb9\u8fc1\u79fb\u66f4\u5feb&#xff1b;0.75\u662f\u65f6\u95f4\u4e0e\u7a7a\u95f4\u7684\u6700\u4f18\u5e73\u8861\u70b9\u3002<\/p>\n<h3>\u5341\u3001\u5e38\u89c1\u9762\u8bd5\u8bef\u533a<\/h3>\n<li>\n<p>\u274c \u94fe\u8868\u957f\u5ea6\u52308\u5c31\u4e00\u5b9a\u6811\u5316&#xff1f;<br \/>\n\u5fc5\u987b\u540c\u65f6\u6ee1\u8db3\u6570\u7ec4\u957f\u5ea6\u226564&#xff0c;\u5426\u5219\u53ea\u4f1a\u6269\u5bb9\u3002<\/p>\n<\/li>\n<li>\n<p>\u274c HashMap \u7ebf\u7a0b\u5b89\u5168&#xff1f;<br \/>\n\u4e0d\u5b89\u5168&#xff0c;\u5e76\u53d1\u63d2\u5165\u53ef\u80fd\u8986\u76d6\u6570\u636e\u30011.7\u4f1a\u5faa\u73af\u94fe\u8868\u6b7b\u5faa\u73af\u3002<\/p>\n<\/li>\n<li>\n<p>\u274c \u6bcf\u6b21\u6269\u5bb9\u90fd\u5f88\u6162&#xff1f;<br \/>\n1.8 \u4f18\u5316\u4e86rehash&#xff0c;\u901f\u5ea6\u8fdc\u5feb\u4e8e1.7\u3002<\/p>\n<\/li>\n<h3>\u603b\u7ed3<\/h3>\n<p>HashMap \u9762\u8bd5\u6838\u5fc3\u4e09\u677f\u65a7&#xff1a;\u5e95\u5c42\u7ed3\u6784\u3001\u6811\u5316\u89c4\u5219\u3001\u6269\u5bb9\u673a\u5236\u3002<br \/>\n\u638c\u63e1\u672c\u6587\u77e5\u8bc6\u70b9&#xff0c;\u9762\u8bd5\u5b98\u6df1\u6316\u6269\u5bb9\u3001\u54c8\u5e0c\u3001\u6811\u5316\u5168\u90e8\u80fd\u7b54\u6ee1\u5206\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u963f\u91cc\u9762\u8bd5\u5b98\u5fc5\u95ee&#xff1a;HashMap\u5e95\u5c42\u539f\u7406\u53ca\u6269\u5bb9\u673a\u5236&#xff01;90%\u5f00\u53d1\u8005\u90fd\u8bf4\u4e0d\u5168&#xff01;<br \/>\n\u524d\u8a00<br \/>\nJava \u96c6\u5408\u9762\u8bd5\u5fc5\u8003\u5929\u82b1\u677f&#xff0c;\u4e00\u5b9a\u662f HashMap \u5e95\u5c42\u539f\u7406  \u6269\u5bb9\u673a\u5236\u3002<br \/>\n\u51e0\u4e4e\u6240\u6709 Java \u540e\u7aef\u9762\u8bd5&#xff0c;\u4e00\u9762\u5fc5\u95ee&#xff1a;<br \/>\nHashMap \u5e95\u5c42\u662f\u4ec0\u4e48\u7ed3\u6784&#xff1f;\u54c8\u5e0c\u51b2\u7a81\u600e\u4e48\u89e3\u51b3&#xff1f;\u4ec0\u4e48\u65f6\u5019\u6269\u5bb9&#xff1f;\u6269\u5bb9\u6d41\u7a0b\u662f\u4ec0\u4e48&#xff1f;\u4e3a\u4ec0\u4e48\u662f 2 \u7684\u5e42&#xff1f;<br \/>\n\u5f88\u591a\u4eba\u53ea\u4f1a\u80cc \u6570\u7ec4\u94fe\u8868\u7ea2<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,176],"topic":[],"class_list":["post-86799","post","type-post","status-publish","format-standard","hentry","category-server","tag-java","tag-176"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u963f\u91cc\u9762\u8bd5\u5b98\u5fc5\u95ee\uff1aHashMap\u5e95\u5c42\u539f\u7406\u53ca\u6269\u5bb9\u673a\u5236\uff0190%\u5f00\u53d1\u8005\u90fd\u8bf4\u4e0d\u5168\uff01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/86799.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u963f\u91cc\u9762\u8bd5\u5b98\u5fc5\u95ee\uff1aHashMap\u5e95\u5c42\u539f\u7406\u53ca\u6269\u5bb9\u673a\u5236\uff0190%\u5f00\u53d1\u8005\u90fd\u8bf4\u4e0d\u5168\uff01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u963f\u91cc\u9762\u8bd5\u5b98\u5fc5\u95ee&#xff1a;HashMap\u5e95\u5c42\u539f\u7406\u53ca\u6269\u5bb9\u673a\u5236&#xff01;90%\u5f00\u53d1\u8005\u90fd\u8bf4\u4e0d\u5168&#xff01; \u524d\u8a00 Java \u96c6\u5408\u9762\u8bd5\u5fc5\u8003\u5929\u82b1\u677f&#xff0c;\u4e00\u5b9a\u662f HashMap \u5e95\u5c42\u539f\u7406 \u6269\u5bb9\u673a\u5236\u3002 \u51e0\u4e4e\u6240\u6709 Java \u540e\u7aef\u9762\u8bd5&#xff0c;\u4e00\u9762\u5fc5\u95ee&#xff1a; HashMap \u5e95\u5c42\u662f\u4ec0\u4e48\u7ed3\u6784&#xff1f;\u54c8\u5e0c\u51b2\u7a81\u600e\u4e48\u89e3\u51b3&#xff1f;\u4ec0\u4e48\u65f6\u5019\u6269\u5bb9&#xff1f;\u6269\u5bb9\u6d41\u7a0b\u662f\u4ec0\u4e48&#xff1f;\u4e3a\u4ec0\u4e48\u662f 2 \u7684\u5e42&#xff1f; \u5f88\u591a\u4eba\u53ea\u4f1a\u80cc \u6570\u7ec4\u94fe\u8868\u7ea2\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/86799.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-29T01:24:40+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/86799.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/86799.html\",\"name\":\"\u963f\u91cc\u9762\u8bd5\u5b98\u5fc5\u95ee\uff1aHashMap\u5e95\u5c42\u539f\u7406\u53ca\u6269\u5bb9\u673a\u5236\uff0190%\u5f00\u53d1\u8005\u90fd\u8bf4\u4e0d\u5168\uff01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-29T01:24:40+00:00\",\"dateModified\":\"2026-07-29T01:24:40+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/86799.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/86799.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/86799.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u963f\u91cc\u9762\u8bd5\u5b98\u5fc5\u95ee\uff1aHashMap\u5e95\u5c42\u539f\u7406\u53ca\u6269\u5bb9\u673a\u5236\uff0190%\u5f00\u53d1\u8005\u90fd\u8bf4\u4e0d\u5168\uff01\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u963f\u91cc\u9762\u8bd5\u5b98\u5fc5\u95ee\uff1aHashMap\u5e95\u5c42\u539f\u7406\u53ca\u6269\u5bb9\u673a\u5236\uff0190%\u5f00\u53d1\u8005\u90fd\u8bf4\u4e0d\u5168\uff01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/86799.html","og_locale":"zh_CN","og_type":"article","og_title":"\u963f\u91cc\u9762\u8bd5\u5b98\u5fc5\u95ee\uff1aHashMap\u5e95\u5c42\u539f\u7406\u53ca\u6269\u5bb9\u673a\u5236\uff0190%\u5f00\u53d1\u8005\u90fd\u8bf4\u4e0d\u5168\uff01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u963f\u91cc\u9762\u8bd5\u5b98\u5fc5\u95ee&#xff1a;HashMap\u5e95\u5c42\u539f\u7406\u53ca\u6269\u5bb9\u673a\u5236&#xff01;90%\u5f00\u53d1\u8005\u90fd\u8bf4\u4e0d\u5168&#xff01; \u524d\u8a00 Java \u96c6\u5408\u9762\u8bd5\u5fc5\u8003\u5929\u82b1\u677f&#xff0c;\u4e00\u5b9a\u662f HashMap \u5e95\u5c42\u539f\u7406 \u6269\u5bb9\u673a\u5236\u3002 \u51e0\u4e4e\u6240\u6709 Java \u540e\u7aef\u9762\u8bd5&#xff0c;\u4e00\u9762\u5fc5\u95ee&#xff1a; HashMap \u5e95\u5c42\u662f\u4ec0\u4e48\u7ed3\u6784&#xff1f;\u54c8\u5e0c\u51b2\u7a81\u600e\u4e48\u89e3\u51b3&#xff1f;\u4ec0\u4e48\u65f6\u5019\u6269\u5bb9&#xff1f;\u6269\u5bb9\u6d41\u7a0b\u662f\u4ec0\u4e48&#xff1f;\u4e3a\u4ec0\u4e48\u662f 2 \u7684\u5e42&#xff1f; \u5f88\u591a\u4eba\u53ea\u4f1a\u80cc \u6570\u7ec4\u94fe\u8868\u7ea2","og_url":"https:\/\/www.wsisp.com\/helps\/86799.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-29T01:24:40+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/86799.html","url":"https:\/\/www.wsisp.com\/helps\/86799.html","name":"\u963f\u91cc\u9762\u8bd5\u5b98\u5fc5\u95ee\uff1aHashMap\u5e95\u5c42\u539f\u7406\u53ca\u6269\u5bb9\u673a\u5236\uff0190%\u5f00\u53d1\u8005\u90fd\u8bf4\u4e0d\u5168\uff01 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-29T01:24:40+00:00","dateModified":"2026-07-29T01:24:40+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/86799.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/86799.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/86799.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u963f\u91cc\u9762\u8bd5\u5b98\u5fc5\u95ee\uff1aHashMap\u5e95\u5c42\u539f\u7406\u53ca\u6269\u5bb9\u673a\u5236\uff0190%\u5f00\u53d1\u8005\u90fd\u8bf4\u4e0d\u5168\uff01"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/86799","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=86799"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/86799\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=86799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=86799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=86799"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=86799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}