A ConcurrentHashMap is thread-safe implementation of Map interface.
In this class, put() and remove() methods are synchronized but not get method.
ConcurrentHashMap vs. Hashtable
ConcurrentHashMap has better performance than Hashtable as it uses bucket level lock instead of object level lock in Hashtable.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.