FileDocCategorySizeDatePackage
SubstrCompDemo.javaAPI DocExample560Sat Aug 07 20:51:34 BST 1999None

SubstrCompDemo

public class SubstrCompDemo extends Object
Demonstrate use of SubstringComparator.
version
$id$

Fields Summary
Constructors Summary
Methods Summary
static voiddump(java.lang.String[] args, java.lang.String title)

		System.out.println(title);
		for (int i=0; i<args.length; i++)
			System.out.println(args[i]);
	
public static voidmain(java.lang.String[] unused)

		String[] strings = {
			"painful", 
			"mainly",
			"gaining",
			"raindrops"
		};
		Arrays.sort(strings);
		dump(strings, "Using Default Sort");
		Arrays.sort(strings, new SubstringComparator());
		dump(strings, "Using SubstringComparator");