how to sort alphabetically
i'm trying to sort a number of arrays into alphabetical order going by surname. The code looks like this
int i;
int j;
String temp;
String temp2;
String temp3;
String temp4;
// Sort the student arrays
for (i=0; i<MAX_RECORDS; i++)
{
for (j=i+1; j><MAX_RECORDS; j++)
{
if (lastName><lastName[j])
{//switch first name ordertemp = lastName;
lastName = lastName[j];
lastName[j] = temp;
//switch last name order
temp2 = firstName;
firstName = firstName[j];
firstName[j] = temp2;
//switch phone no. order
temp3 = telNumber;
telNumber = telNumber[j];
telNumber[j] = temp3;
//switch email order
temp4 = emailAddress;
emailAddress = emailAddress[j];
emailAddress[j] = temp4;
When i compile it i come up with the followin error:
operator >< cannot be applied to java.lang.String,java.lang.String
Can ne pls help its starting to do my head in

