如何去除ArrayList中的重复元素?(相同的数据和属性值相等的用户自定义对象)

如何去除ArrayList中的重复对象? 1.去除重复字符串 去重方法 private ArrayList getList(List list){ ArrayList newList=new ArrayList(); Iterator iterator=list.iterator(); //如果已知数组中还有元素 while (iterator.hasNext()){ //newList中不包括该
相关文章
相关标签/搜索