Set接口、TreeSet、HashSet、LinkedHashSet(元素是有序的、其他基本和HashSet一样)

HashSet存储过程
重写了hashCode()、equals()方法后,第2个重复的person梁朝伟就不会存入到HashSet。
https://github.com/godmaybelieve
HashSet存储过程
重写了hashCode()、equals()方法后,第2个重复的person梁朝伟就不会存入到HashSet。