Create a Sorted Hash in Java with a Custom Comparator
- by kunjaan
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 are also string.
Sample Hash:
Za,FOO
Ab,Bar