public class InsertionSort { public static Student[] sort(Student[] list){ //copy all elements into a new list Student[] sortedList = new Student[list.length]; for(int i=0; i 0 && insert.compareTo(sortedList[j-1]) < 0){ sortedList[j] = sortedList[j-1]; j--; } sortedList[j] = insert; } return sortedList; } }