{"id":75,"date":"2021-04-26T11:16:48","date_gmt":"2021-04-26T03:16:48","guid":{"rendered":"http:\/\/112.124.66.68\/?p=75"},"modified":"2021-04-26T11:16:48","modified_gmt":"2021-04-26T03:16:48","slug":"hashcode%e7%9a%84%e4%bd%9c%e7%94%a8","status":"publish","type":"post","link":"https:\/\/sanlangcode.com\/index.php\/2021\/04\/26\/hashcode%e7%9a%84%e4%bd%9c%e7%94%a8\/","title":{"rendered":"Hashcode\u7684\u4f5c\u7528"},"content":{"rendered":"<p>Hashcode\u7684\u4f5c\u7528<br \/>\njava\u7684\u96c6\u5408\u6709\u4e24\u7c7b\uff0c\u4e00\u7c7b\u662fList\uff0c\u8fd8\u6709\u4e00\u7c7b\u662fSet\u3002<br \/>\n<span style=\"color: #ff6600;\">\u524d\u8005\u6709\u5e8f\u53ef\u91cd\u590d\uff0c\u540e\u8005\u65e0\u5e8f\u4e0d\u91cd\u590d\u3002<\/span><br \/>\n<!--more--><br \/>\n\u5f53\u6211\u4eec\u5728set\u4e2d\u63d2\u5165\u7684\u65f6\u5019\u600e\u4e48\u5224\u65ad\u662f\u5426\u5df2\u7ecf\u5b58\u5728\u8be5\u5143\u7d20\u5462\uff0c\u53ef\u4ee5\u901a\u8fc7equals\u65b9\u6cd5\u3002<br \/>\n\u4f46\u662f\u5982\u679c\u5143\u7d20\u592a\u591a\uff0c\u7528\u8fd9\u6837\u7684\u65b9\u6cd5\u5c31\u4f1a\u6bd4\u8f83\u6ee1\u3002<br \/>\n\u4e8e\u662f\u6709\u4eba\u53d1\u660e\u4e86\u54c8\u5e0c\u7b97\u6cd5\u6765\u63d0\u9ad8\u96c6\u5408\u4e2d\u67e5\u627e\u5143\u7d20\u7684\u6548\u7387\u3002<br \/>\n\u8fd9\u79cd\u65b9\u5f0f<span style=\"color: #ff6600;\">\u5c06\u96c6\u5408\u5206\u6210\u82e5\u5e72\u4e2a\u5b58\u50a8\u533a\u57df\uff0c\u6bcf\u4e2a\u5bf9<\/span><br \/>\n<span style=\"color: #ff6600;\"> \u8c61\u53ef\u4ee5\u8ba1\u7b97\u51fa\u4e00\u4e2a\u54c8\u5e0c\u7801\uff0c\u53ef\u4ee5\u5c06\u54c8\u5e0c\u7801\u5206\u7ec4<\/span>\uff0c<br \/>\n\u6bcf\u7ec4\u5206\u522b\u5bf9\u5e94\u67d0\u4e2a\u5b58\u50a8\u533a\u57df\uff0c\u6839\u636e\u4e00\u4e2a\u5bf9\u8c61\u7684\u54c8\u5e0c\u7801\u5c31<br \/>\n\u53ef\u4ee5\u786e\u5b9a\u8be5\u5bf9\u8c61\u5e94\u8be5\u5b58\u50a8\u7684\u90a3\u4e2a\u533a\u57df\u3002<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nhashCode\u65b9\u6cd5\u53ef\u4ee5\u8fd9\u6837\u7406\u89e3\uff1a<br \/>\n\u5b83\u8fd4\u56de\u7684\u5c31\u662f\u6839\u636e\u5bf9\u8c61\u7684\u5185\u5b58\u5730\u5740\u6362\u7b97\u51fa\u7684\u4e00\u4e2a\u503c\u3002<br \/>\n\u8fd9\u6837\u4e00\u6765\uff0c\u5f53\u96c6\u5408\u8981\u6dfb\u52a0\u65b0\u7684\u5143\u7d20\u65f6\uff0c\u5148\u8c03\u7528\u8fd9\u4e2a\u5143\u7d20\u7684hashCode\u65b9\u6cd5\uff0c<br \/>\n\u5c31\u4e00\u4e0b\u5b50\u80fd<span style=\"color: #ff6600;\">\u5b9a\u4f4d\u5230\u5b83\u5e94\u8be5\u653e\u7f6e\u7684\u7269\u7406\u4f4d\u7f6e<\/span>\u4e0a\u3002<br \/>\n\u5982\u679c\u8fd9\u4e2a\u4f4d\u7f6e\u4e0a\u6ca1\u6709\u5143\u7d20\uff0c\u5b83\u5c31\u53ef\u4ee5\u76f4\u63a5\u5b58\u50a8\u5728\u8fd9\u4e2a\u4f4d\u7f6e\u4e0a\uff0c<br \/>\n\u4e0d\u7528\u518d\u8fdb\u884c\u4efb\u4f55\u6bd4\u8f83\u4e86\uff1b\u5982\u679c\u8fd9\u4e2a\u4f4d\u7f6e\u4e0a<br \/>\n\u5df2\u7ecf\u6709\u5143\u7d20\u4e86\uff0c\u5c31\u8c03\u7528\u5b83\u7684equals\u65b9\u6cd5\u4e0e\u65b0\u5143\u7d20\u8fdb\u884c\u6bd4\u8f83\uff0c<br \/>\n\u76f8\u540c\u7684\u8bdd\u5c31\u4e0d\u5b58\u4e86\uff0c\u4e0d\u76f8\u540c\u5c31\u6563\u5217\u5176\u5b83\u7684\u5730\u5740\u3002<br \/>\n\u8fd9\u6837\u4e00\u6765\u5b9e\u9645\u8c03\u7528<span style=\"color: #ff6600;\">equals\u65b9\u6cd5\u7684\u6b21\u6570\u5c31\u5927\u5927\u964d\u4f4e<\/span>\u4e86\uff0c\u51e0\u4e4e\u53ea\u9700\u8981\u4e00\u4e24\u6b21\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hashcode\u7684\u4f5c\u7528 java&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":325,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-75","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java"],"_links":{"self":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts\/75","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":0,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts\/75\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/media\/325"}],"wp:attachment":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/categories?post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/tags?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}