java.util.Map.keySet will give you a java.util.Set holding the keys of the Map.
With that, you can create a java.util.List, passing it the set in the constructor. Then you can sort the list.
Then with the sorted list you can get the values.
Alternatively, you could use Map.entrySet() to get a set of the key/value pairs (instances of Map.Entry) in the map, create a List using those pairs, and then sort the list using a java.util.Comparator that knows how to deal with Map.Entry objects, sorting them by the keys. Then you could iterate through the sorted list and grab the values, or whatever.
> java.util.Map.keySet will give you a java.util.Set
> holding the keys of the Map.
>
> With that, you can create a java.util.List, passing
> it the set in the constructor. Then you can sort the
> list.
>
> Then with the sorted list you can get the values.
>
Great solution man... Exactly wat I did... Thanks in heaps