参考
import java.util.Arrays;
public class Test {
public static void main(String[] args) {
String[] array = {"aabb","aacc","abc","adbc","base","bbse","aaaaaaaaa"};
Arrays.sort(array);
System.out.print(Arrays.toString(array));
}
}
输出
[aaaaaaaaa, aabb, aacc, abc, adbc, base, bbse]