ã¯ããã« ããã£ã°ããã°ã«ãã¦ãããã¼âªã£ã¨ ( ´ã¼`)ãã¥ã¼ï¼ï¼ï¼(ï¾Ðï¾)ï¾ï½¯ï¼ ã©ã¼ã ä»æ¥èªãã ã¨ãã 45 ãã¼ã¸ã 66 ãã¼ã¸ ååã¯ãã¡ã Effective Java èªæ¸ä¼ 2 æ¥ç® ãequals nightã - ITæ¦è¨ hashCode 2 å¥ç´ ã·ã°ããã£ã«ã³ããªãã£ã¼ã«ããå¤æ´ããªããã°ãã㤠hashCode ãå¼ã³åºãã¦ãå¤ã¯å¤ãããªã x.equals(y) ã true ã®å ´åã¯ã x.hashCode() == y.hashCode() ã true equals ããªã¼ãã¼ã©ã¤ãããã hashCode ããªã¼ãã¼ã©ã¤ããã¹ã åè¿°ã® 2 å¥ç´ãå®ãããã«å¿ è¦ x.equals(y) ã false ã®å ´å ããªããããã x.hashCode() != y.hashCode() ã«ãªãå¿ è¦ã¯ãªããã å¤ããã©ãã¦ããã»ãã HashMap ã®
{{#tags}}- {{label}}
{{/tags}}