public class TestSort {
public static void main(String[] args) {
String[] words;
words = new String[] {“tango”,”alpha”,”charlie”,”bravo”};
System.out.println(“before:”);
for (String w : words) {
System.out.println(w);
}
SortAlgorithms.selectionSort(words);
System.out.println(“after:”);
for (String w : words) {
System.out.println(w);
}
Time[] ts;
ts = new Time[5];
ts[0] = new Time(13,0,0);
ts[1] = new Time(14,30,0);
ts[2] = new Time(11,30,0);
ts[3] = new Time(13,0,0);
ts[4] = new Time(12,12,0);
System.out.println(“Before:”);
for (int i=0; i
System.out.print(“,”);
}
System.out.print(ts[i]);
}
System.out.println();
SortAlgorithms.selectionSort(ts);
System.out.println(“After:”);
for (int i=0; i
System.out.print(“,”);
}
System.out.print(ts[i]);
}
System.out.println();
}
}