Read the documentation for the map interface, if you had you would realise that. 1 HashMap is an implementation of Map i.e an object that maps keys to values 2 A map cannot contain duplicate keys 3 each key can map to at most one value.
Joined: Dec 01, 2003
Well, you seem to already know it. You just need to realize that Set implements Collection, and that there are HashMap methods for getting the set of keys and the collection of values. Just make sure that your keys and values are Comparable or that you have a Comparator!