User Story
Create a code that has the elements as sum of the elements of the following sets.
List<Integer> List1 = new List<Integer>{1,2,3};
List<Integer> List2 = new List<Integer>{1,2,3};
Code
List<Integer> List1 = new List<Integer>{1,2,3};
List<Integer> List2 = new List<Integer>{1,2,3};
List<Integer> List3 = new List<Integer>();
for (Integer i=0; i<List1.size(); i++){
Integer newElement =List1.get(i)+List2.get(i);
List3.add(newElement);
}
System.debug(List3);