| 【C#】如何对list集合进行排序
					当前位置:点晴教程→知识管理交流
					
					→『 技术文档交流 』
					
				 
 //主要是在作一些编程题,有时候须要对列表排序,才能获得想要的结果 public class Test {     public static void main(String[] args) {         List         list.add(1);         list.add(5);         list.add(2);         //注意这个地方要写Object         Object a[]=new Object[list.size()];         a=  list.toArray();         Arrays.sort(a);         for (int i = 0; i < a.length; i++) {             System.out.println(a[i]); } } } 该文章在 2021/3/9 18:52:41 编辑过 | 关键字查询 相关文章 正在查询... |