Core Java - What is the difference between HashMap and ConcurrentHashMap ?
This is also one of the most popular java
collections interview question . Make sure this question is in your to do list
before appearing for the interview .
Main differences between HashMap and
ConcurrentHashMap are :
a. HashMap is not synchronized while
ConcurrentHashMap is synchronized.
b. HashMap can have one null key and any number
of null values while ConcurrentHashMap does not allow null keys and null values
.
No comments:
Post a Comment