which Collections class I can use

HiI am new to collections. I was wondering which Collections class can be used to store the following key-value pairts:Data (key value pairs): 揻red? 10揼eorge? 20搈ary? 15搄oe? 5Any suggestions, help etc is highly appreciated. Thanks in
[297 byte] By [ilango171a] at [2007-10-3 2:52:38]
# 1
This tutorial: http://java.sun.com/docs/books/tutorial/collections/index.htmlwill tell you.
DrClapa at 2007-7-14 20:41:38 > top of Java-index,Core,Core APIs...
# 2
Hashmap
SoulTech2012a at 2007-7-14 20:41:38 > top of Java-index,Core,Core APIs...
# 3
HashMap<String,Integer> or TreeMap<String,Integer> or LinkedHashMap<String,Integer> or Hashtable<String,Integer> or ...
ejpa at 2007-7-14 20:41:38 > top of Java-index,Core,Core APIs...
# 4
Hi ,HashMap would be the best alternative which accepts a key value pair HashMap hp=new HashMap();hp.put("key",value);Regards.
zihar_shaikha at 2007-7-14 20:41:38 > top of Java-index,Core,Core APIs...
# 5

Whether it's the best alternative depends on several factors which haven't been specified yet, such as whether he wants sequential access and/or sorted access, as well as random access, whether he needs auto-synchronization or will do it himself, ...

HashMap<String,Integer> is probably the best answer but we don't know for sure.

ejpa at 2007-7-14 20:41:38 > top of Java-index,Core,Core APIs...