import java.util.Arrays; class Sorter3 { public static void main(String[] args) { // some data, clearly out of order Person[] arr = new Person[6]; arr[0] = new Person("Tyler"); arr[1] = new Person("Lola"); arr[2] = new Person("Gerardo"); arr[3] = new Person("Luke"); arr[4] = new Person("Saad"); arr[5] = new Person("Lee"); System.out.println(Arrays.toString(arr)); PersonComparator c = new PersonComparator(); // BubbleSort2.sort(arr, c); // modified to support Comparator // SelectionSort.sort(arr, c); // more efficient than BubbleSort InsertionSort.sort(arr, c); // much more efficient than SelectionSort System.out.println(Arrays.toString(arr)); } }