I have two arrays, one is String[] and other is int[]. The values in the integer array correspond to the elements of the String array. For example, the String array contains the names of some teams and another int array contains their points in the league. I can sort the int array using Arrays.sort and I want to sort the String array according to the points and if two teams have same points, I should arrange them alphabetically.
I thing I can make a 2D array but how to sort it then?