ConcurrentHashMap is designed for concurrency and offers better performance than Hashtable or synchronized HashMap.
Source Code
Map map = new ConcurrentHashMap();
map.put("1", "One");
map.put("2", "Two");
System.out.println(map.get("1"));
ConcurrentHashMap is designed for concurrency and offers better performance than Hashtable or synchronized HashMap.
Map map = new ConcurrentHashMap();
map.put("1", "One");
map.put("2", "Two");
System.out.println(map.get("1"));