public static void main(String[] args)
{
String[] array = new String[] {"Jenny", "Rob", "Dereck", "Mike", "Kristin"};
for (int i = left; i < right - 1; i++)
{
for (int j = left; j < right - 1; j++)
{
if (array[j].compareTo(array[j+1]) > 0)
{
String temp = array[j];
array[j] = array[j+1];
array[j+1] = temp;
}
}
System.out.println(array[i]);
}
}
Any help is greatly appreciated!

New Topic/Question
Reply




MultiQuote











|