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
HashMap<String,Integer> or TreeMap<String,Integer> or LinkedHashMap<String,Integer> or Hashtable<String,Integer> or ...
ejpa at 2007-7-14 20:41:38 >

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 >
