2017年4月28日
摘要: 【HashSet】 1. HashSet存储不能够存储相同的元素,元素是否相同的判断:重写元素的equals方法。equals方法和hashCode方法必须兼容,如:equals方法判断的是用户的名字name,那么hashCode的返回的hashcode必须是name。hashcode(); 2. 阅读全文
posted @ 2017-04-28 11:03 sidesky 阅读(281) 评论(0) 推荐(0) 编辑