set

set必须不可以重复,必须实现equal方法,

hashSet:必须实现hashcode方法,

treeSet:底层是树结构,必须实现比较接口comparable

原文地址:https://www.cnblogs.com/javaweb2/p/6361876.html