Why are XOR often used in java hashCode() but another bitwise operators are used rarely?
Of all bit-operations XOR has the best bit shuffling properties. This truth-table explains why: A B AND 0 0 0 0 1 0 1 0 0 1 1 1 A B OR 0 0 0 0 1 1 1 0 1 1 1 1 A B XOR 0 0 0 0 1 1 1 0 … Read more