HashMap的put方法 下面来看一下put方法的源码(详细注释): public V put(K key, V value) { return putVal(hash(key), key, value, false, true); } final V putVal(int hash, K key, V value, boolean onlyIfAbsent, boolean evict) { Node<K,V>[] tab; Node<K,V> p; int n, i; // hashmap是延迟构建,第一次put才进行初始化 if ((tab = table) == null ||