I am trying to create a kind of highscore system in a program. I have a list of scores and then a list of names. I want to add the scores and names to the end of the ArrayList and then sort the list of scores using collections. The problem is that I need to sort the list of names in the exact same way.
Start [1, 3, 2] ["name 1" , "name 2" , "name 3"]
Sorted [3, 2, 1] ["name 2" , "name 3" , "name 1"]
Like that.
question from:https://stackoverflow.com/questions/65891032/how-to-link-two-lists-in-java