I want to create a TreeMap in Java with a custom sort order. The sorted keys which are string need to be sorted according to the second character. The values ar
TreeMap
Assuming you don't mean Hash as in hash function or the sort...
You could easily accomplish this by creating a "wrapper" class for String and overriding the compareTo method