What's the behavior of ConcurrentHashMap inside ConcurrentHashMap in Java?

Viewed 17

I have a data structure HashMap<String, HashMap<String, String>> Now I need to add tread safety to this data structure, which one should I use?

ConcurrentHashMap<String, HashMap<String, String>>

or

ConcurrentHashMap<String, ConcurrentHashMap<String, String>>

What's the difference between these two?

0 Answers
Related