System.out.println(title); for (int i=0; i<args.length; i++) System.out.println(args[i]);
String[] strings = { "painful", "mainly", "gaining", "raindrops" }; Arrays.sort(strings); dump(strings, "Using Default Sort"); Arrays.sort(strings, new SubstringComparator()); dump(strings, "Using SubstringComparator");