@@ -0,0 +1,676 @@
+import java.util.Scanner;%0Aimport java.util.Arrays;%0A%0Aclass SortStrings %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        Integer numberOfStrings;%0A        Integer i;%0A        Scanner scanIn = new Scanner(System.in);%0A        numberOfStrings = Integer.parseInt(scanIn.nextLine());%0A%0A        if (numberOfStrings %3C= 0) %7B%0A            return;%0A        %7D%0A%0A        String%5B%5D strings = new String%5BnumberOfStrings%5D;%0A%0A        for (i = 0; i %3C numberOfStrings; i++) %7B%0A            strings%5Bi%5D = scanIn.nextLine();%0A        %7D%0A%0A        scanIn.close();%0A%0A        Arrays.sort(strings);%0A%0A        for (i = 0; i %3C numberOfStrings; i++) %7B%0A            System.out.println(strings%5Bi%5D);%0A        %7D%0A    %7D%0A%7D%0A

Add SortStrings to sort strings on the command line