自定義對象去重(Set篇)

當須要給集合去重時,實現的方式有不少。這裏介紹使用Set去重(兩種方式)java 需求:給多個Student對象去重ide public class Student { private int id; private String name; public Student() {} public Student(int id,String name) { this.id=id; t
相關文章
相關標籤/搜索