set的经典实现:hashSet ,treeSet,linkedHashSet都不是线程安全的,怎么保证线程安全哪? 解决办法: Set set = Collections.synchronizedSet(set 对象)