Possible Duplicate:
What’s the difference between ConcurrentHashMap and Collections.synchronizedMap(Map)?
I was reading differences between HashMap, Collenctions.synchonizedMap and ConcurrentHashMap. My understanding is that Collections.synchronizedMap applied lock on entire collection, hence performance overhead. But ConcurrentHashMap doesn't use synchronization. It uses segments to achieve the results, so it offers a similar performance as that of HashMap.
Please suggest if my understanding is correct. Also if this is the case, can I use ConcurrentHashMap everywhere even if there may not be multiple threads accessing it?