RosettaCodeData/Task/Collections/Apex/collections-5.apex
2016-12-05 23:44:36 +01: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