
数组
MasqueJava
沉默啊,不在沉默中爆发,就在沉默中灭亡!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
去除数组中重复的元素
public static String[] delRepeatElement(String[] str){List list = new ArrayList(); for (int i=0; i if(!list.contains(str[i])) { list.add(str[i]);原创 2013-07-21 12:34:22 · 817 阅读 · 0 评论 -
List、Set、数组之间的转换
List、Set、数组之间的转换数组转Collection使用Apache Jakarta Commons Collections:importorg.apache.commons.collections.CollectionUtils;String[] strArray = {"aaa", "bbb","ccc"};List strList = newArrayList(转载 2013-07-21 12:36:27 · 913 阅读 · 0 评论 -
关于List集合元素的删除
List l = new ArrayList();l.add("aw");l.add("a");l.add("aw");l.add("wa");l.add("a");l.add("aW");l.add("ac");l.add("a");l.add("aW");l.add("a");l.add("aq");l.add("a");当有这样的一个集合我们一遍原创 2013-09-17 01:37:12 · 1271 阅读 · 0 评论