摘要:
ConcurrentHashMap 和 HashTable,Collections.synchronizedMap的区别 1.性能: HashTable,Collections.synchronizedMap,无论读或者写操作,都会对整个集合加锁,导致同一时间的其他操作阻塞。 1.7 版本下的 Co 阅读全文
摘要:
区别 1.HashMap 是非线程安全的,而 ConcurrentHashMap 是线程安全的 2.HashMap 的底层实现时数组+链表,而 ConcurrentHashMap的底层实现,在 1.7 的时候是采用数组+Segment+HashEntry;到了 1.8 版本则移除了 Segment, 阅读全文