You're just overthinking the whole concept, here is the solution; it compiled and ran fine:
import java.util.*;
import java.io.*;
public class SortStringArray
{
public static void main(String args[])
{
String ss[] = {"Bill", "Mary", "Lee", "Agnes", "Alfred", "Thomas", "Alvin", "Bernard", "Erza", "Herman"};
Arrays.sort(ss);
for(int x = 0; x<10; x++)
{
System.out.print(ss[x]);
}
}
}
I took away your increment because it was already being done in the loop's parameters. I just changed your 'test' in the increment to < as the array goes up to 9 (0-9 = 10 people)