Campbell Ritchie wrote:Have a look at the documentation for the different classes which implement Map; they tell you which is faster.
Do you mean have a mapping like this?
"Campbell" ---> 3
"Ilias" ---> 3
Yes, that is supported by the Map interface.
ilias basha wrote:can you give a brief code for that. and how to traverse within the map, i guess we cannot use iterator. any alternate.