I've done a little java coding with some JSON values i get from the internet. I put the values into a string array, print it and look for the best (aka highest) score and it's "parent" data set. But finally it would be nice to have them sorted by this score automaticly.
The array looks like:
myArray[0][0] = "John"
myArray[0][1] = "20" //(<- int to String)
myArray[0][2] = "21.356" //(<- float to String)
myArray[1][0] = "Sarah" //data
myArray[1][1] = "32" //data
myArray[1][2] = "27.045" //score to be sorted on
Also i thought about sorting the data-sets before putting them into the array, but as they come in plain text (by reading json values from a website), i have to make a connection of the values before sorting and this is the point, where i have to pick and put them by hand in the array at first.
Is there an efficient way to sort the array?