public static void main(String[] args) {
Set set = new HashSet();
Set set1 = new HashSet();
set.add("sanny");
set.add("mary");
set.add("bill");
set.add("tom");
set.add("tony");
set.add("mark");
set.add("smith");
set.add("anny");

set1.add("smith");
set1.add("tom");
set1.add("tony");
set1.add("mark");

set.removeAll(set1);// sooooooo easy!

相关文章:

  • 2021-12-03
  • 2022-12-23
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2022-01-01
  • 2021-08-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-29
相关资源
相似解决方案