|I have been going round in circles about this problem now, I desperately need help.|
I am trying to do a highscore list in Java which needs to store 10 names and their scores and it should be sorted from lowest score to highest and printed out at the end.
So, my ideas have been:
ArrayList - been working mostly on this to work, and I actually got one name and one score to stay there, but not a total sorted list. And I also need to make it private in the class so the list actually updates within the running method, until I quit it.
Map - LinkedMap, Hashmaps etc, I noticed that didn't really work out as I imagined.
I got a suggestion to write a new object, something like this:
private ArrayList <HighScore> hs;
what does that mean, to put a new name between the '<>'?
Hope to get some helping words.