I am working on a project to read data in from a text file regarding different athletes' scores at the winter Olympics. I have successfully been able to find each country's total score by comparing each athlete with their country and adding it to a total. Each of these totals are stored in doubles: FRA, CHN, UKR, GER, RUS, CAN, ITA, USA, JPN, and GBR. (All representing different countries)
So now I have a bunch of values stored as doubles that I need to sort in descending order. I know I could just put the doubles into an array and sort it, but I will lose the name of the country associated to each value. In PHP I could simply put it into an associative array and sort it - but unfortunately I have a very poor understanding of java and don't have a clue what to do. I would appreciate it if someone could at least point me in the right direction.
The output needs to Display the countries name and it's score in descending order.