i have this method that i got from a website about selection sort that i need to check how it works :
public static void selectionSort(int[] data, int low, int high) {
if (low < high) {
swap(data, low, findMinIndex(data, low));
selectionSort(data, low + 1, high);
}
public static void swap(int[] array, int index1, int index2) {
int tmp = array[index1];
array[index1] = array[index2];
array[index2] = tmp;
}
public static int findMinIndex(int[] data, int index) {
int minIndex;
if (index == data.length - 1)
return index;
minIndex = findMinIndex(data, index + 1);
if (data[minIndex] < data[index])
return minIndex;
else
return index;
}
public static void main (String[] args) {
int[] numbers = {3, 15, 1, 9, 6, 12, 21, 17, 8}; }
my question is how can i run the program in the main?(whats the code to run the program) thanks.