(*) Note that you almost never actually want a Hashtable. That's an old, obsolete class. Where you might have used Hashtable, you should generally use HashMap.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P
Joined: Aug 05, 2005
If I understand the OP correctly, he wants the keys in the order specified by the sorted values. If that's right, then a SortedMap won't work, as that is sorted by the keys.
As Peter says, it is better to use a HashMap. You can retrieve a set of Map.Entry objects from this using the entrySet method. These objects contain the key and value. You will then need to write a Comparator to sort these and pass an instance of this Comparator to the Collections.sort method.
Your Comparator will be pretty simple. In the overridden compare method, simply use the Map.Entry.getValue method to retrieve the values and compare them using the String.compareToIgnoreCase method.
Of course, if Peter's interpretation of your question was correct, just ignore this post.