java program to synchronize HashMap in java
Answers
Answered by
5
Answer:
If you want to synchronize HashMap in Java or looking for a thread-safe alternative of HashMap then there are following options. Use Collections.synchronizedMap () to synchronize Map – This method returns a synchronized (thread-safe) map backed by the specified map.
Similar questions
Accountancy,
1 month ago
Biology,
1 month ago
Chemistry,
1 month ago
Computer Science,
3 months ago
Physics,
3 months ago
Chemistry,
10 months ago
English,
10 months ago