import java.util.*; class JavaSort6 // Java's sort on a random ArrayList of Strings { public static void main(String[] args) throws Exception { Random rand = new Random(); Scanner input = new Scanner(System.in); System.out.print("Enter the number of words: "); int num = input.nextInt(); ArrayList a = new ArrayList(); for(int i=0; i