首先介绍HashMap的原理,然后引入HashTable和ConcurrentHashMAP.

1 HashMap

HashMap的数据结构为

Hash_Map31

1 loadFactor的作用

就是为了计算扩容的阈值

 

2 HashTable

1和HashMap区别

就在于线程安全

 

3 ConcurrentHashMap 

1 和HashTable的区别

就是提高了并发性

 

分类&标签