I didnt get the sense of Maps in Java. When is it recommended to use a Map instead of a List?
thanks in advance,
nohereman
Maps store data objects with unique keys,therefore provides fast access to stored objects. You may use ConcurrentHashMap in order to achieve concurrency in multi-threaded environments. Whereas lists may store duplicate data and you have to iterate over the data elements in order to access a particular element, therefore provide slow access to stored objects. You may choose any data structure depending upon your requirement.