Map | Key | value | 父类 | 线程是否安全 |
Hashtable | Dicitionary | 安全(过时) | ||
TreeMap | null | AbstractMap | 不安全 | |
HashMap | null | null | AbstractMap | 不安全 |
ConcurrentHashMap | AbstractMap | 分段锁、CAS确保安全 |
Map | Key | value | 父类 | 线程是否安全 |
Hashtable | Dicitionary | 安全(过时) | ||
TreeMap | null | AbstractMap | 不安全 | |
HashMap | null | null | AbstractMap | 不安全 |
ConcurrentHashMap | AbstractMap | 分段锁、CAS确保安全 |