import sort.InsertionSort; import sort.QuickSort; import sort.Sort; /* * Created on 24 oct. 2004 * */ /** * @author baudon * */ public class TestSort { public static void main(String[] args) { Sort[] sorts = { new QuickSort(), new InsertionSort() }; for (int i = 0; i < sorts.length; i++) { String[] argsCopy = new String[args.length]; System.arraycopy(args, 0, argsCopy, 0, args.length); sorts[i].doSort(argsCopy); for (int j = 0; j < args.length; ++j) { System.out.print(argsCopy[j] + " "); } System.out.println(); } } }