private List<YourBean> removeDuplicate(List<YourBean> list) { Set<YourBean> set = new HashSet<YourBean>(); List<YourBean> newList = new ArrayList<YourBean>(); for (Iterator<YourBean> iter = list.iterator(); iter.h…
public class Demo { /** * 去掉重复值 */ public static void main(String[] args) { String test = "100,120,166,1555,120,150,100"; String[] test1 = test.split(","); ArrayList list = new ArrayList(); for (int i = 0; i < test1.length; i++) { i…