HashMap.java で次のコードを見ました。
h ^= k.hashCode();
// This function ensures that hashCodes that differ only by
// constant multiples at each bit position have a bounded
// number of collisions (approximately 8 at default load factor).
h ^= (h >>> 20) ^ (h >>> 12);
return h ^ (h >>> 7) ^ (h >>> 4);
いくつかのランダムな入力は加算に似た出力を生成しましたが、次のコードは 0 になりました
int p = 10;
p ^= 10;
System.out.println("_______ " + p);