Notes
In Apex, the listName.add(element);
syntax is used to add an element to a list.
Here's an example to illustrate how to use listName.add(element);
:
List<Integer> numbers = new List<Integer>{1, 2, 3, 4, 5};
numbers.add(6);
System.debug('Updated List: ' + numbers);
Output: Updated List: (1, 2, 3, 4, 5, 6)
Video
Video does not exists.