List<String>  list2=new ArrayList();//存放很多值的list
//根据set不能存储相同的值该特性来判断list2中的值是否重复
HashSet set=new HashSet();
for (Object i : list2) {
    set.add(i);
}

if (!(set.size()==list2.size())) {

 }

相关文章:

  • 2021-07-07
  • 2021-08-10
  • 2021-09-26
  • 2021-11-18
  • 2022-12-23
  • 2021-08-05
  • 2022-02-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-14
相关资源
相似解决方案