题解 | #字符串排序#
字符串排序
http://www.nowcoder.com/practice/5af18ba2eb45443aa91a11e848aa6723
import java.util.*;
public class Main {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String[] arr = new String[n];
for (int i = 0; i < arr.length; i++) {
arr[i] = sc.next();
}
Arrays.sort(arr);
for (int i = 0; i < n; i++) {
System.out.println(arr[i]);
}
}
}