28 April 2010

How to sort a HashMap based on its values?

The trick is to use 'Collections' class and use a LinkedHashMap to hold the the sorted entries inserted in order of insertion.

No comments: