I am trying this for some hour but not finding any best approach to achieve iteration of hashmap in reverse order, this is the hashmap I have.
Map
Map> sortedMap = new TreeMap>(Collections.reverseOrder()); Collections.reverseOrder() keeps the map sorted in descending order.