首先看看最关键的方法put的操原理: public V put(K key, V value) { return putVal(hash(key), key, value, false, true); } //hash函数 static final int hash(Object key) { int h; ……