当前位置:网站首页>How do I remove duplicates from the list- How to remove duplicates from a list?

How do I remove duplicates from the list- How to remove duplicates from a list?

2022-07-06 21:06:00 Technology feast

problem :

I want to remove duplicates from a list but what I am doing is not working: I want to remove duplicates from the list , But what I did didn't work :

List<Customer> listCustomer = new ArrayList<Customer>();    for (Customer customer: tmpListCustomer){  if (!listCustomer.contains(customer))   {    listCustomer.add(customer);  } }

Solution :

Reference resources : https://stackoom.com/en/question/BxGs
原网站

版权声明
本文为[Technology feast]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131129227932.html

随机推荐