java集合的并集、交集、差集

1.set1.retainAll(set2);求交集
2.set1.addAll(set2);并集
3.set1.removeAll(set2);差集

猜你喜欢

转载自www.cnblogs.com/jiang--nan/p/9115204.html