Elements of a set

Report a typo

Which elements does the set contain after performing all the operations?

Set<Integer> set = new HashSet<>();
set.addAll(Set.of(1, 2, 3, 4));
set.retainAll(Set.of(2, 3, 4, 5));
set.removeAll(Set.of(1, 2));

The order of elements is not important here.

Select one option from the list
___

Create a free account to access the full topic