Skip to content
目录概览

请简述HashSet是如何保证元素唯一性的?

HashSet集合中存储的元素,通过重写hashCode() 与 equals()方法来保证元素唯一性