标签:参数 out 生成 span collect 字符 com 有序 ons
集合框架的工具类:
Collections:
方法sort()
System.out.println(list); // 自然排序
Collections.sort(list);
System.out.println(list);
// 按照字符串长度排序,再自然排序
Collections.sort(list,new Compare());
System.out.println(list);
返回插入位置 角标的负数再减一;
Syso(list.get(2);返回角标对应值;
Collection.replaceAll(list,"200","10000");用后面的 值替换前面的值
反转
Collections.reverse(list);
System.out.println(list);
arr=Arrays.copyof(arr,4);
object数组不能强转成其他类型
标签:参数 out 生成 span collect 字符 com 有序 ons
原文地址:http://www.cnblogs.com/lv123/p/7215411.html