会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
lost_s
博客园
首页
订阅
管理
2019年9月26日
List集合去重
摘要: List<String> idList = new ArrayList<>(); idList.add("1"); idList.add("1"); //初始化HashSet对象,并把list对象元素赋值给HashSet对象 HashSet<String> set = new HashSet<>(idList); //把List集合清空 idList.clear(); //把HashSet对象添加
阅读全文
posted @ 2019-09-26 10:14 lost_s
阅读(203)
评论(0)
推荐(0)
编辑