import Java.util.*;
/**
* Demonstrates how to sort strings.
***/
public class SortDemo
{
public static void main(String args[]) throws Exception
{
String names[] = new String[5];
int i=0;
names[i++] = "Mary";
names[i++] = "John";
names[i++] = "David";
names[i++] = "Pam";
names[i++] = "Joe";
Arrays.sort(names);
for (int x=0; x < names.length; x++)
System.out.println("Hello " + names[x]);
}
}