I am using java trying to create a program.
What I am trying to do is sort arraylist and then sort a seperate array with the same order. I know how to sort an arrylist but the problem is I have a seperate array where each element is related to an element in the arraylist.
for example here is a possible situation:
String[] array = {"U R F", "B' F2", "L' D"}
arraylist<Double> = {"2.03", "4.32", "1.23"}
(I know that an arraylist isn't initialized like that I did it for simplicity)
What I want to end up with is this:
String[] array = {"L' D", "U R F", "B' F2"}
arraylist<Double> = {"1.23", "2.03", "4.32"}
With the array and arraylist sorted by arraylist numerically.