摘要:
HashSet实现自定义类的add()方法的原理 自定义一个类 public class Student { private String id; public Student(String id) { this.id = id; } } 测试类 public static class Test{ 阅读全文
posted @ 2021-05-12 21:48
imetal
阅读(128)
评论(0)
推荐(0)
摘要:
Set接口的实现类HashSet的add()方法的底层实现 添加两个重复数据 实验代码 class Test{ public static void main(String[] args) { Set<String> set = new HashSet<>(); Scanner sc = new S 阅读全文
posted @ 2021-05-12 18:01
imetal
阅读(109)
评论(0)
推荐(0)

浙公网安备 33010602011771号