InterviewSolution
Saved Bookmarks
| 1. |
What Is The Difference Between Hashmap And Concurrenthashmap In Java? |
Answer»
In ConcurrentHashMap synchronization is done a little differently. Rather than locking every method on a common lock, ConcurrentHashMap uses separate lock for separate buckets thus locking only a portion of the Map. In ConcurrentHashMap synchronization is done a little differently. Rather than locking every method on a common lock, ConcurrentHashMap uses separate lock for separate buckets thus locking only a portion of the Map. |
|