Possible Duplicate:
How to sort a Map<Key, Value> on the values in Java?
I have a map in java with Map<String, String>
.Map contaions <Id, Date>
. i want to sort these map according to date. how can i do that? This is the map after print it
-------------------------------------
PTRRRRRR 08-20-2011
-------------------------------------
TESTDESC 08-01-2012
-------------------------------------
TESTMYO 12-29-2011
-------------------------------------
TESTTEST 08-01-2012
-------------------------------------
TESTPROL 08-01-2012
-------------------------------------
TESTPRO 08-01-2012
-------------------------------------
PNAMELQ 08-02-2012
-------------------------------------
TESTMYO 12-29-2011
------------------------------------