Set用来存放唯一值的集合,对于重复的值,会自动过滤掉。还是直接看例子吧:

 iterator.next();
System.out.println(name);
}
}

 

运行时输出结果:

a
b

相关文章:

  • 2022-12-23
  • 2021-08-15
  • 2021-08-19
  • 2022-12-23
  • 2022-02-01
  • 2021-05-26
  • 2022-12-23
  • 2021-12-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案