I have created a Hash map where I need to store two different values corresponding to one key. Using
final Map<String, List<Double>> map = new HashMap<String, List<Double>>();
final List<Double> valSetOne = new ArrayList<Double>();
for(int i=0;i<100;i++)
{
valSetOne.add(movies.getPrice());
valSetOne.add(movies.getSeat());
map.put(movies.getId, valSetOne);
}
System.out.println(map);
On printing the value of map I'm getting output something like this{1235567=[1100.00,100], 1256689=[1300.00,100]}
Now I want to sort this hash map in descending order on the basis of price i.e key and values of 1300.00 should come before 1100.00.