Create a Sorted Hash in Java with a Custom Comparator

Posted by kunjaan on Stack Overflow See other posts from Stack Overflow or by kunjaan
Published on 2010-05-01T03:56:52Z Indexed on 2010/05/01 4:07 UTC
Read the original article Hit count: 330

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about hash

Related posts about treemap