String [] s={"欢迎","你","3","G","同","学"};
Arrays.sort(s);
for(String s1 : s){
System.out.print(s1);
}------------------控制台输出3G你同学欢迎
String [] s={"欢迎你","3","G","同","学"};
Arrays.sort(s);
for(String s1 : s){
System.out.print(s1);
}------------------控制台输出3G同学欢迎你
Its_forever
相关分类