I guess that you want the list of keys sorted.
If your hashmap is called h
, then try this:
SortedSet<String> sortedKeys = new TreeSet<String>(h.keySet());
4
solved How to sort hashmap? [closed]
I guess that you want the list of keys sorted.
If your hashmap is called h
, then try this:
SortedSet<String> sortedKeys = new TreeSet<String>(h.keySet());
4
solved How to sort hashmap? [closed]