摘要:
本文主要探讨concurrentHashMap的put方法实现。其中有经典代码(CAS)实现 final V putVal(K key, V value, boolean onlyIfAbsent) { if (key == null || value == null) throw new Null 阅读全文
摘要:
hashmap(jdk1.8)扩容机制: hashmap在实例化时(new HashMap())时,只初始化了扩张因子 public HashMap() { this.loadFactor = DEFAULT_LOAD_FACTOR; // all other fields defaulted 默认 阅读全文