I need to sort these strings in order and I have changed the code of my program which use to sort integers and now I need it to sort strings and I cannot get it to work, any help.....
import java.util.Scanner;
public class Strings {
// --------------------------------------------
// Reads in an array of strings, sorts them,
// then prints them in sorted order.
// --------------------------------------------
public static void main(String[] args) {
stringList = new String;
String size;
Comparable temp;
Scanner scan = new Scanner(System.in);
System.out.print("\nHow many strings do you want to sort? ");
size = scan.nextInt();
StringList = new String[size];
System.out.println("\nEnter the string(s)...");
for (String i = 0; i < size; i++)
StringList[i] = scan.nextInt();
Sorting.insertionSort(StringList);
System.out.println("\nYour strings in sorted order...");
for (String i = 0; i < size; i++)
System.out.print(StringList[i] + " ");
System.out.println();
}
}