HashMap和ConcurrentHashMap的区别是什么?

答案解析

HashMap线程不安全,ConcurrentHashMap线程安全,采用分段锁或CAS,适合并发场景。