RosettaCodeData/Task/Collections/Apex/collections-5.apex
2023-07-01 13:44:08 -04:00

4 lines
275 B
Text

Set<Integer> s = new Set<Integer>(); // Define a new set
s.add(1); // Add an element to the set
System.assert(s.contains(1)); // Assert that the set contains an element
s.remove(1); // Remove the element from the set