摘要: HashSet 的底层实现是 HashMap public HashSet() { map = new HashMap<>(); } public boolean add(E e) { return map.put(e, PRESENT)==null; 》所以可以放入null,但只能放入一个null 阅读全文
posted @ 2017-09-21 16:38 机智的阿勇 阅读(204) 评论(0) 推荐(0)