package test_set_map;
import java.util.Arrays;
import java.util.Collections;
public class Test_Collectins {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String demos[]={"hello","软件小宇","test","中国"};
Collections.sort(Arrays.asList(demos));
for(int i=0;i<demos.length;i++){
System.out.println(demos[i]);
}
}
}
java中排序一个字符串数组
最新推荐文章于 2024-03-07 00:09:57 发布