As of Java 8, there are default methods on the Map.Entry interface to allow sorting of map iterations.
Java SE 8
Map<String, Integer> numberOfEmployees = new HashMap<>();
numberOfEmployees.put("executives", 10);
numberOfEmployees.put("human ressources", 32);
numb...