import sort.Sort; import sort.Sorts; /* * Created on 24 oct. 2004 * */ /** * @author baudon * */ public class TestSort { public static void sortAndPrint(Sort sort, Comparable [] a) { sort.doSort(a); for (int i = 0; i < a.length; i++) { System.out.print(a[i] + " "); } System.out.println(); } public static void main(String[] args) { String[] args2 = new String[args.length]; System.arraycopy(args, 0, args2, 0, args.length); sortAndPrint(Sorts.insertionSort(), args); sortAndPrint(Sorts.quickSort(), args2); } }