以下是哈希函数的源代码java.util.HashMap.评论很好地解释了它的成就.但怎么样?什么是^和>>>运营商在做什么?有人可以解释代码实际上如何做评论所说的内容吗?
/**
* Applies a supplemental hash function to a given hashCode, which
* defends against poor quality hash functions. This is critical
* because HashMap uses power-of-two length hash tables, that
* otherwise encounter collisions for hashCodes that do not differ
* in lower bits. Note: Null keys always map to hash 0, thus index 0.
*/
static int hash(int h) {
// This function ensures …Run Code Online (Sandbox Code Playgroud)