因为HashSet 基于HashMap 实现,利用HashMap 实现了Set 接口的add 方法。本质是上通过Key 来进行去重。 如下为HashSet 的add 方法: public boolean add(E e) { return map ...
確定! 回上一頁