{"width":"100%","provider_name":"Hatena Blog","url":"https://irof.hateblo.jp/entry/20110622/p1","blog_title":"\u65e5\u3005\u5e38\u3005","provider_url":"https://hatena.blog","categories":["Java","Java\u5165\u9580+\u03b1"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Firof.hateblo.jp%2Fentry%2F20110622%2Fp1\" title=\"HashSet\u3067equals\u3068hashCode\u3092\u4f7f\u3063\u305f\u554f\u984c - \u65e5\u3005\u5e38\u3005\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/irof/","version":"1.0","title":"HashSet\u3067equals\u3068hashCode\u3092\u4f7f\u3063\u305f\u554f\u984c","published":"2011-06-22 00:00:00","blog_url":"https://irof.hateblo.jp/","height":"190","description":"\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u305f\u3089\u3069\u3046\u306a\u308b\u304b\u3002(1) Set set = new HashSet(); set.add(new Object()); set.add(new Object()); System.out.println(set.size()); (2) class A { public boolean equals(Object obj) {throw new RuntimeException();} } Set set = new HashSet(); set.add(new A()); set.add(new A()); System.out.println(set.size()); \u2026","image_url":null,"author_name":"irof","type":"rich"}