I have an [] that has some numbers (distances from some point).
I want to create an array of indexes into the first array where the indexes are sorted by the distance.>
double[] dist= {3.2, 1.4, 7.3, 2.2, 9.1}; // your array
int[] sortedIndexes= new int[dist.length]; // your array
double[] temp = dist.clone(); // clone the array
Arrays.sort(temp); // Use native array sort function
for(int i = 0; i