HashSet内部是通过HashMap实现。只有使用排序的时候才使用TreeMap。否知使用HashMap。
以HashSet 为例:
HashSet set = new HashSet
set.put(new Student(1,"aa") );
set.put(new Student(1,"aa") );
set.put(
HashSet内部是通过HashMap实现。只有使用排序的时候才使用TreeMap。否知使用HashMap。
以HashSet 为例:
HashSet set = new HashSet
set.put(new Student(1,"aa") );
set.put(new Student(1,"aa") );
set.put(