set1.retainAll(set2);Method retainAll modifies the set directly, keeps the values that are both in set1 & set2.
set1.addAll(set22);Method addAll adds all the members of set2 to the set1 (modifying set1).
set1.removeAll(set2);Method removeAll keeps values that are in setA that don't exist in setB.