View difference between Paste ID: 5hb2PFGv and CZ0KfkjN
SHOW: | | - or go back to the newest paste.
1
import java.util.Scanner;
2
import java.util.Arrays;
3
public class SortArrayOfStrings {
4
5
	public static void main(String[] args) {
6
		Scanner sc = new Scanner(System.in);
7
		int n = sc.nextInt();
8
		String[] allWords = new String[n];
9
		for(int i=0;i<n;i++)
10
		{
11
			allWords[i] = sc.next();
12
		}
13-
		sc.close();
13+
14
		for(int i=0;i<n;i++)
15
		{
16
			System.out.println(allWords[i]);
17
		}
18
	}
19
}