In the case of multithreading,,, we have four option for a map to use...
Can anybody Know which one to consider so that we can have a better performance/////
1...
Use hashmap()
Map map = new HashMap();
and synchronize all the methods where are using hashmap
2..
Synchronized the hashMap using Collections class static utility method synchronizedMap(..);
Like Map map = Collections.synchornizedMap(new HashMap());
3. use ConcurrentHashMap();
4.HashTable()..as it already have all the method as synchronized....
Which one will give better performance...
As per what i think...concurrentHashMap() will win among all the four ways...