Hey, that's three questions! ;)
The java.util.HashMap implementation of the java.util.Map interface does not allow duplicate keys (it does allow the null key), distinct keys
can map to duplicate values and it is neither ordered nor sorted. If you are looking for a sorted Map implementation
you should have a look at java.util.TreeMap.
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.