retain All
This method modifies the set by retaining only the elements that are present in both the set and the specified collection. Elements that are not in the collection will be removed from the set.
This method modifies the set by retaining only the elements that are present in both the set and the specified collection. Elements that are not in the collection will be removed from the set.