Organizational Research By

Surprising Reserch Topic

ConcurrentHashMap vs Synchronized HashMap



asked Sep 13, 2013 in Core java by rajesh
edited Sep 12, 2013
0 votes
115 views



Related Hot Questions

2 Answers

0 votes
  1. SynchronizedHashMap use a single monitor to synchronize all the methods where as ConcurrentHashMap uses multitude of locks.
  2. lookup methods in ConcurrentHashMap are not synchronized.
answered Sep 13, 2013 by rajesh
edited Sep 12, 2013
0 votes
Both maps are thread-safe implementations of the Map interface. ConcurrentHashMap is implemented for higher throughput in cases where high concurrency is expected.
answered Sep 13, 2013 by rajesh
edited Sep 12, 2013

...