{"id":7993,"date":"2022-12-16T11:38:26","date_gmt":"2022-12-16T03:38:26","guid":{"rendered":"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993"},"modified":"2022-12-16T11:46:48","modified_gmt":"2022-12-16T03:46:48","slug":"hashmap","status":"publish","type":"post","link":"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993","title":{"rendered":"HashMap"},"content":{"rendered":"<p>\u4e0d\u540c\u7248\u672c\u7684JDK\u7684HashMap\u7684\u5e95\u5c42\u5b9e\u73b0\u5747\u6709\u6240\u4e0d\u540c<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_16 counter-hierarchy counter-decimal ez-toc-grey\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" style=\"display: none;\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993\/#JDK%E5%90%84%E4%B8%AA%E7%89%88%E6%9C%AC%E7%9A%84%E6%BA%90%E7%A0%81%E6%9F%A5%E7%9C%8B\" title=\"JDK\u5404\u4e2a\u7248\u672c\u7684\u6e90\u7801\u67e5\u770b\">JDK\u5404\u4e2a\u7248\u672c\u7684\u6e90\u7801\u67e5\u770b<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993\/#HashMap%E7%9A%84%E7%89%B9%E6%80%A7\" title=\"HashMap\u7684\u7279\u6027\">HashMap\u7684\u7279\u6027<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993\/#%E5%90%84%E4%B8%AA%E7%89%88%E6%9C%AC%E7%9A%84HashMap%E7%9A%84%E5%8C%BA%E5%88%AB\" title=\"\u5404\u4e2a\u7248\u672c\u7684HashMap\u7684\u533a\u522b\">\u5404\u4e2a\u7248\u672c\u7684HashMap\u7684\u533a\u522b<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993\/#JDK18%E7%9A%84HashMap%E5%AE%9E%E7%8E%B0\" title=\"JDK1.8\u7684HashMap\u5b9e\u73b0\">JDK1.8\u7684HashMap\u5b9e\u73b0<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993\/#JDK17%E5%8F%8A%E4%BB%A5%E4%B8%8B%E7%9A%84HashMap%E5%AE%9E%E7%8E%B0\" title=\"JDK1.7\u53ca\u4ee5\u4e0b\u7684HashMap\u5b9e\u73b0\">JDK1.7\u53ca\u4ee5\u4e0b\u7684HashMap\u5b9e\u73b0<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993\/#JDK15%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90\" title=\"JDK1.5\u6e90\u7801\u5206\u6790\">JDK1.5\u6e90\u7801\u5206\u6790<\/a><ul class=\"ez-toc-list-level-2\"><li class=\"ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993\/#%E4%B8%BB%E5%B9%B2%E6%95%B0%E7%BB%84%E5%88%9D%E5%A7%8B%E5%8C%96\" title=\"\u4e3b\u5e72\u6570\u7ec4\u521d\u59cb\u5316\">\u4e3b\u5e72\u6570\u7ec4\u521d\u59cb\u5316<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993\/#JDK16%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90\" title=\"JDK1.6\u6e90\u7801\u5206\u6790\">JDK1.6\u6e90\u7801\u5206\u6790<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-9\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993\/#JDK17%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90\" title=\"JDK1.7\u6e90\u7801\u5206\u6790\">JDK1.7\u6e90\u7801\u5206\u6790<\/a><ul class=\"ez-toc-list-level-2\"><li class=\"ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-10\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993\/#key%E6%98%AF%E5%A6%82%E4%BD%95%E8%AE%A1%E7%AE%97%E5%87%BA%E6%95%B0%E7%BB%84%E7%9A%84%E4%B8%8B%E6%A0%87%E7%9A%84\" title=\"key\u662f\u5982\u4f55\u8ba1\u7b97\u51fa\u6570\u7ec4\u7684\u4e0b\u6807\u7684\">key\u662f\u5982\u4f55\u8ba1\u7b97\u51fa\u6570\u7ec4\u7684\u4e0b\u6807\u7684<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-11\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993\/#%E5%A4%B4%E6%8F%92%E6%B3%95%E4%B8%8E%E9%93%BE%E8%A1%A8\" title=\"\u5934\u63d2\u6cd5\u4e0e\u94fe\u8868\">\u5934\u63d2\u6cd5\u4e0e\u94fe\u8868<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-1\"><a class=\"ez-toc-link ez-toc-heading-12\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993\/#JDK18%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90\" title=\"JDK1.8\u6e90\u7801\u5206\u6790\">JDK1.8\u6e90\u7801\u5206\u6790<\/a><ul class=\"ez-toc-list-level-2\"><li class=\"ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-13\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=7993\/#%E7%9F%A5%E8%AF%86%E7%82%B9%E9%A2%84%E5%A4%87-%E7%BA%A2%E9%BB%91%E6%A0%91\" title=\"\u77e5\u8bc6\u70b9\u9884\u5907-\u7ea2\u9ed1\u6811\">\u77e5\u8bc6\u70b9\u9884\u5907-\u7ea2\u9ed1\u6811<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"JDK%E5%90%84%E4%B8%AA%E7%89%88%E6%9C%AC%E7%9A%84%E6%BA%90%E7%A0%81%E6%9F%A5%E7%9C%8B\"><\/span>JDK\u5404\u4e2a\u7248\u672c\u7684\u6e90\u7801\u67e5\u770b<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>\u5404\u4e2a\u7248\u672c\u7684\u6e90\u7801\u67e5\u770b\uff1a<a href=\"https:\/\/blog.csdn.net\/zuochao_2013\/article\/details\/79624579\">https:\/\/blog.csdn.net\/zuochao_2013\/article\/details\/79624579<\/a><\/p>\n<p>android\u5404\u4e2a\u7248\u672c\u5bf9\u5e94\u7684JDK\u7248\u672c<br \/>\n<a href=\"https:\/\/blog.csdn.net\/u010825468\/article\/details\/78909550\">https:\/\/blog.csdn.net\/u010825468\/article\/details\/78909550<\/a><br \/>\n\u901a\u8fc7\u6539\u53d8build.gradle\u91cc\u7684\u7248\u672c\uff0c\u5373\u53ef\u67e5\u770b\u5bf9\u5e94JDK\u7684\u6e90\u7801\u3002<\/p>\n<p>\u540e\u6765\u6211\u53d1\u73b0\u4e0a\u9762\u7684\u8fd9\u4e2a\u8868\u4e0d\u51c6\u786e\uff0candroid\u6211\u7528SDK API 19\uff0c\u7136\u540e\u6309\u7167\u4e0b\u9762\u7684\u65b9\u6cd5\uff0c\u7528010Editor\u6765\u67e5\u770bHashMap.class\uff0c\u53d1\u73b0\u7adf\u7136\u662fJDK1.5\u3002<br \/>\n<a href=\"https:\/\/blog.csdn.net\/mengxiangxingdong\/article\/details\/89437087\">https:\/\/blog.csdn.net\/mengxiangxingdong\/article\/details\/89437087<\/a><\/p>\n<p><img src=\"http:\/\/xinyiworld.top\/wordpress_it\/wp-content\/uploads\/2022\/12\/111.png\" alt=\"\" \/><br \/>\n\u7ecf\u6211\u6d4b\u8bd5\uff0c\u771f\u6b63\u7684\u60c5\u51b5\u662fAPI19\u300120\u90fd\u662fJDK1.5\uff0c\u7136\u540e\u5230\u4e86API21\u76f4\u63a5\u5c31JDK1.7\u4e86\uff0c\u6ca1\u6709\u7528\u5230JDK1.6\u3002<\/p>\n<p><strong>\u5927\u5751\uff1a<\/strong><br \/>\n\u770b\u4e86\u5f88\u591a\u7684\u535a\u5ba2\uff0c\u4f46\u662f\u7528android.jar\u91cc\u7684\u6e90\u7801\u4e00\u5bf9\u6bd4\uff0c\u600e\u4e48\u4e5f\u5bf9\u4e0d\u4e0a\u3002<br \/>\n<a href=\"http:\/\/www.apkbus.com\/thread-567645-1-1.html\">http:\/\/www.apkbus.com\/thread-567645-1-1.html<\/a><br \/>\n\u539f\u6765android\u6e90\u7801\u91cc\u7684JDK\u548cJava\u7684JDK\u4e0d\u662f\u4e00\u4e2a\u4e1c\u897f\u3002<\/p>\n<h1><span class=\"ez-toc-section\" id=\"HashMap%E7%9A%84%E7%89%B9%E6%80%A7\"><\/span>HashMap\u7684\u7279\u6027<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<ul>\n<li>\u7ebf\u7a0b\u4e0d\u5b89\u5168<\/li>\n<li>\u67e5\u8be2\u5feb<\/li>\n<\/ul>\n<h1><span class=\"ez-toc-section\" id=\"%E5%90%84%E4%B8%AA%E7%89%88%E6%9C%AC%E7%9A%84HashMap%E7%9A%84%E5%8C%BA%E5%88%AB\"><\/span>\u5404\u4e2a\u7248\u672c\u7684HashMap\u7684\u533a\u522b<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p><a href=\"https:\/\/www.nowcoder.com\/discuss\/151172\">https:\/\/www.nowcoder.com\/discuss\/151172<\/a><\/p>\n<p><a href=\"https:\/\/www.2cto.com\/kf\/201707\/654203.html\">https:\/\/www.2cto.com\/kf\/201707\/654203.html<\/a><\/p>\n<p><a href=\"https:\/\/blog.csdn.net\/qq_36520235\/article\/details\/82417949\">https:\/\/blog.csdn.net\/qq_36520235\/article\/details\/82417949<\/a><\/p>\n<h1><span class=\"ez-toc-section\" id=\"JDK18%E7%9A%84HashMap%E5%AE%9E%E7%8E%B0\"><\/span>JDK1.8\u7684HashMap\u5b9e\u73b0<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p><a href=\"https:\/\/www.cnblogs.com\/little-fly\/p\/7344285.html\">https:\/\/www.cnblogs.com\/little-fly\/p\/7344285.html<\/a><\/p>\n<p><a href=\"https:\/\/blog.csdn.net\/qq_22200097\/article\/details\/82791479\">https:\/\/blog.csdn.net\/qq_22200097\/article\/details\/82791479<\/a><\/p>\n<h1><span class=\"ez-toc-section\" id=\"JDK17%E5%8F%8A%E4%BB%A5%E4%B8%8B%E7%9A%84HashMap%E5%AE%9E%E7%8E%B0\"><\/span>JDK1.7\u53ca\u4ee5\u4e0b\u7684HashMap\u5b9e\u73b0<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<ul>\n<li>HashMap\u7684\u4e3b\u5e72\u662f\u6570\u7ec4(\u4e0d\u8981\u4ee5\u4e3a\u5e26\u4e2aHash\u5c31\u548cHashTable\u626f\u4e0a\u5173\u7cfb\u4e86)\uff0c\u6570\u7ec4\u7684\u5143\u7d20\u662fHashMapEntry<\/li>\n<li>HashMapEntry\u662f\u4e00\u4e2a\u94fe\u8868\u7ed3\u6784<\/li>\n<\/ul>\n<p><a href=\"https:\/\/blog.csdn.net\/qq_38455201\/article\/details\/80732839\">https:\/\/blog.csdn.net\/qq_38455201\/article\/details\/80732839<\/a><\/p>\n<p><a href=\"https:\/\/blog.csdn.net\/C18298182575\/article\/details\/87167323\">https:\/\/blog.csdn.net\/C18298182575\/article\/details\/87167323<\/a><\/p>\n<h1><span class=\"ez-toc-section\" id=\"JDK15%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90\"><\/span>JDK1.5\u6e90\u7801\u5206\u6790<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<h2><span class=\"ez-toc-section\" id=\"%E4%B8%BB%E5%B9%B2%E6%95%B0%E7%BB%84%E5%88%9D%E5%A7%8B%E5%8C%96\"><\/span>\u4e3b\u5e72\u6570\u7ec4\u521d\u59cb\u5316<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre><code>  \/**\n     * Min capacity (other than zero) for a HashMap. Must be a power of two\n     * greater than 1 (and less than 1 &lt;&lt; 30).\n     *\/\n    private static final int MINIMUM_CAPACITY = 4;\n\n    \/**\n     * An empty table shared by all zero-capacity maps (typically from default\n     * constructor). It is never written to, and replaced on first put. Its size\n     * is set to half the minimum, so that the first resize will create a\n     * minimum-sized table.\n     *\/\n    private static final Entry[] EMPTY_TABLE\n            = new HashMapEntry[MINIMUM_CAPACITY &gt;&gt;&gt; 1];\n\n     \/**\n     * Constructs a new empty {@code HashMap} instance.\n     *\/\n    @SuppressWarnings(&quot;unchecked&quot;)\n    public HashMap() {\n        table = (HashMapEntry&lt;K, V&gt;[]) EMPTY_TABLE;\n        threshold = -1; \/\/ Forces first put invocation to replace EMPTY_TABLE\n    }<\/code><\/pre>\n<p>\u53ef\u89c1\uff0cHashMap\u7684\u65e0\u53c2\u6784\u9020\u65b9\u6cd5\u9ed8\u8ba4\u4f1a\u521b\u5efa\u4e00\u4e2a\u5927\u5c0f\u4e3a2\u7684\u6570\u7ec4\u3002<br \/>\n...\u7248\u672c\u592a\u65e7\uff0c\u5c31\u4e0d\u5f80\u4e0b\u5206\u6790\u4e86\u3002<\/p>\n<h1><span class=\"ez-toc-section\" id=\"JDK16%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90\"><\/span>JDK1.6\u6e90\u7801\u5206\u6790<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p><a href=\"https:\/\/blog.csdn.net\/rocksteadypro\/article\/details\/80082822\">https:\/\/blog.csdn.net\/rocksteadypro\/article\/details\/80082822<\/a><\/p>\n<h1><span class=\"ez-toc-section\" id=\"JDK17%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90\"><\/span>JDK1.7\u6e90\u7801\u5206\u6790<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p><a href=\"https:\/\/www.cnblogs.com\/xiaolovewei\/p\/7993521.html\">https:\/\/www.cnblogs.com\/xiaolovewei\/p\/7993521.html<\/a><\/p>\n<p><a href=\"https:\/\/www.cnblogs.com\/xiaozhongfeixiang\/archive\/2019\/09\/23\/11548563.html\">https:\/\/www.cnblogs.com\/xiaozhongfeixiang\/archive\/2019\/09\/23\/11548563.html<\/a><\/p>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u70b9\uff1a<\/p>\n<ul>\n<li>\n<h2><span class=\"ez-toc-section\" id=\"key%E6%98%AF%E5%A6%82%E4%BD%95%E8%AE%A1%E7%AE%97%E5%87%BA%E6%95%B0%E7%BB%84%E7%9A%84%E4%B8%8B%E6%A0%87%E7%9A%84\"><\/span>key\u662f\u5982\u4f55\u8ba1\u7b97\u51fa\u6570\u7ec4\u7684\u4e0b\u6807\u7684<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img src=\"http:\/\/xinyiworld.top\/wordpress_it\/wp-content\/uploads\/2022\/12\/2222.png\" alt=\"\" \/><br \/>\n\u54c8\u5e0c\u503c\u6c42\u6570\u7ec4\u4e0b\u6807<\/p>\n<pre><code>hash & (tab.length - 1);<\/code><\/pre>\n<p>\u6269\u5bb9\u4e3a\u5565\u662f2\u7684\u500d\u6570\uff0c\u548c\u4e0a\u9762\u8fd9\u4e2a\u516c\u5f0f\u4e5f\u662f\u76f8\u5173\u7684\uff1a<a href=\"https:\/\/blog.csdn.net\/ptsx0607\/article\/details\/68945883\">https:\/\/blog.csdn.net\/ptsx0607\/article\/details\/68945883<\/a>,\u4fdd\u8bc1\u4e86\u6563\u5217\u7684\u5747\u5300\u6027,\u54c8\u5e0c\u78b0\u649e\u7684\u673a\u7387\u5c31\u4f1a\u51cf\u5c0f\u3002<\/p>\n<\/li>\n<li>\n<h2><span class=\"ez-toc-section\" id=\"%E5%A4%B4%E6%8F%92%E6%B3%95%E4%B8%8E%E9%93%BE%E8%A1%A8\"><\/span>\u5934\u63d2\u6cd5\u4e0e\u94fe\u8868<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><a href=\"https:\/\/blog.csdn.net\/insomsia\/article\/details\/88367436\">https:\/\/blog.csdn.net\/insomsia\/article\/details\/88367436<\/a><br \/>\n\u770bput\u65b9\u6cd5\uff1a<\/p>\n<pre><code>  @Override public V put(K key, V value) {\n    if (key == null) {\n        return putValueForNullKey(value);\n    }\n\n    int hash = secondaryHash(key);\n    HashMapEntry<K, V>[] tab = table;\n    int index = hash & (tab.length - 1);\n    for (HashMapEntry<K, V> e = tab[index]; e != null; e = e.next) {\n        if (e.hash == hash && key.equals(e.key)) {  \n            preModify(e);\n            V oldValue = e.value;\n            e.value = value;\n            return oldValue;\n        }\n    }\n\n    \/\/ No entry for (non-null) key is present; create one\n    modCount++;\n    if (size++ > threshold) {\n        tab = doubleCapacity();\n        index = hash & (tab.length - 1);\n    }\n    addNewEntry(key, value, hash, index);\n    return null;\n}\n<\/code><\/pre>\n<p>\u91cd\u590d\u5143\u7d20\u5224\u65ad:<strong>hash\u76f8\u540c\uff0ckey\u76f8\u540c\u7684\u80af\u5b9a\u662f\u540c\u4e00\u4e2a\u5143\u7d20\u3002<\/strong><\/p>\n<pre><code>e.hash == hash && key.equals(e.key)<\/code><\/pre>\n<p>\u4f46\u662f\u53ef\u80fd\u4e0d\u540c\u7684\u5143\u7d20hash\u503c\u4e0d\u4e00\u6837\uff0c\u7b97\u51fa\u7684index\u5374\u4e00\u6837\uff0c\u4f46\u662f\u53c8\u4e0d\u662f\u540c\u4e00\u4e2a\u5143\u7d20(<strong>\u8fd9\u5c31\u662f\u54c8\u5e0c\u78b0\u649e\u95ee\u9898\uff0c\u54c8\u5e0c\u7b97\u6cd5\u65e0\u6cd5\u9003\u907f\u8fd9\u4e2a\u95ee\u9898<\/strong>)\uff0c\u6570\u7ec4\u4e2d\u7684\u8fd9\u4e2a\u7d22\u5f15\u4f4d\u7f6e\u5df2\u7ecf\u88ab\u5360\u636e\u4e86\uff0c\u90a3\u4e48\u6211\u600e\u4e48\u5b58\u50a8\u8fd9\u4e2a\u65b0\u7684\u5143\u7d20\u5462\uff1f<br \/>\n\u8bf7\u770bHashMapEntry\u8fd9\u4e2a\u7c7b\uff1a<br \/>\n<img src=\"http:\/\/xinyiworld.top\/wordpress_it\/wp-content\/uploads\/2022\/12\/333.png\" alt=\"\" \/><br \/>\n\u518d\u770b\u6dfb\u52a0HashMapEntry\u7684\u65b9\u6cd5\uff1a<\/p>\n<pre><code>void addNewEntry(K key, V value, int hash, int index) {\n    table[index] = new HashMapEntry<K, V>(key, value, hash, table[index]);\n}\n\nHashMapEntry(K key, V value, int hash, HashMapEntry<K, V> next) {\n        this.key = key;\n        this.value = value;\n        this.hash = hash;\n        this.next = next;\n    }<\/code><\/pre>\n<blockquote>\n<p>\u5bf9\u4e8eaddNewEntry\u65b9\u6cd5<br \/>\n\u5982\u679cindex\u5904\u672c\u8eab\u6ca1\u6709\u5143\u7d20\u5360\u636e\uff0c\u6b64\u65f6table[index]\u5c31\u662fnull\u3002<br \/>\n\u90a3\u4e48\u76f4\u63a5\u5c31\u6dfb\u52a0\u4e00\u4e2aHashMapEntry\u5143\u7d20\uff0c\u5b83\u7684next\u6307\u9488\u6307\u5411\u539f\u6765Index\u4f4d\u7f6e\u7684\u5143\u7d20\uff0c\u4e5f\u5c31\u662fnull\uff1b<\/p>\n<p>\u5982\u679cindex\u5904\u672c\u8eab\u6709\u5143\u7d20\uff0c\u4e5f\u5c31\u662f\u54c8\u5e0c\u51b2\u7a81\u4e86\uff0c<br \/>\n\u90a3\u4e48\u76f4\u63a5\u5c31\u6dfb\u52a0\u4e00\u4e2aHashMapEntry\u5143\u7d20\uff0c\u5b83\u7684next\u6307\u9488\u6307\u5411\u539f\u6765Index\u4f4d\u7f6e\u7684\u5143\u7d20\uff0c\u4e5f\u5c31\u662f\u54c8\u5e0c\u51b2\u7a81\u7684\u5143\u7d20\u3002\u5934\u63d2\u6cd5\u5c31\u662f\u8fd9\u4e48\u6765\u7684\u3002<\/p>\n<p>key\u4e3anull\uff0cHashMap\u662f\u5355\u72ec\u7528\u4e00\u4e2aHashMapEntry\u53d8\u91cf\u6765\u5b58\u50a8\u7684\uff0c\u5e76\u4e0d\u662f\u5b58\u50a8\u5728\u6570\u7ec4\u4e2d\u3002\u6240\u6709\u7684\u589e\u5220\u6539\u67e5<br \/>\n\u90fd\u662f\u5148\u5224\u65ad\u7684key\u662f\u5426\u4e3anull\u3002<\/p>\n<\/blockquote>\n<p>\u5bf9\u4e8e\u8ba1\u7b97\u673a\u4e13\u4e1a\u7684\u4eba\u6765\u8bf4\uff0c\u5f97\u51fa\u4e0a\u9762\u7684\u7ed3\u8bba\u53ef\u80fd\u4e0d\u96be\u3002\u4f46\u662f\u5bf9\u4e8e\u975e\u8ba1\u7b97\u673a\u4e13\u4e1a\u7684\u6211\u6765\u8bf4\uff0c\u6162\u6162\u7684\u53d1\u73b0\u4e86\u6570\u636e\u7ed3\u6784\u4e4b\u7c7b\uff0c\u7b80\u76f4\u592a\u7f8e\u5999\u4e86\uff01<\/p>\n<\/li>\n<li>\n<p>\u54c8\u5e0c\u51b2\u7a81<br \/>\n<a href=\"https:\/\/www.iteye.com\/blog\/xiaolu123456-1485349\">https:\/\/www.iteye.com\/blog\/xiaolu123456-1485349<\/a><br \/>\n<a href=\"https:\/\/www.nowcoder.com\/discuss\/151172\">https:\/\/www.nowcoder.com\/discuss\/151172<\/a><\/p>\n<\/li>\n<li>\n<p>\u5e76\u53d1\u5bfc\u81f4\u7684\u6b7b\u5faa\u73af\u95ee\u9898<br \/>\n<a href=\"https:\/\/blog.csdn.net\/pange1991\/article\/details\/82377980\">https:\/\/blog.csdn.net\/pange1991\/article\/details\/82377980<\/a><br \/>\n<a href=\"https:\/\/www.jianshu.com\/p\/61a829fa4e49\">https:\/\/www.jianshu.com\/p\/61a829fa4e49<\/a><\/p>\n<\/li>\n<\/ul>\n<h1><span class=\"ez-toc-section\" id=\"JDK18%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90\"><\/span>JDK1.8\u6e90\u7801\u5206\u6790<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<h2><span class=\"ez-toc-section\" id=\"%E7%9F%A5%E8%AF%86%E7%82%B9%E9%A2%84%E5%A4%87-%E7%BA%A2%E9%BB%91%E6%A0%91\"><\/span><a href=\"https:\/\/www.jianshu.com\/p\/6047aeded1a3\">\u77e5\u8bc6\u70b9\u9884\u5907-\u7ea2\u9ed1\u6811<\/a><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><a href=\"https:\/\/blog.csdn.net\/u010890358\/article\/details\/80496144\">https:\/\/blog.csdn.net\/u010890358\/article\/details\/80496144<\/a> \uff08\u8be6\u7ec6\u89e3\u91ca\u6bcf\u884c\u4ee3\u7801\uff09<\/p>\n<p><a href=\"https:\/\/www.jianshu.com\/p\/400f3c019557\">https:\/\/www.jianshu.com\/p\/400f3c019557<\/a><\/p>\n<button class=\"simplefavorite-button\" data-postid=\"7993\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>\u4e0d\u540c\u7248\u672c\u7684JDK\u7684HashMap\u7684\u5e95\u5c42\u5b9e\u73b0\u5747\u6709\u6240\u4e0d\u540c \u76ee\u5f55 JDK\u5404\u4e2a\u7248\u672c\u7684\u6e90\u7801\u67e5\u770bHashMap\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[597],"tags":[],"_links":{"self":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/7993"}],"collection":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7993"}],"version-history":[{"count":4,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/7993\/revisions"}],"predecessor-version":[{"id":8000,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/7993\/revisions\/8000"}],"wp:attachment":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7993"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}