Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
3
Task/Arrays/Apex/arrays-1.apex
Normal file
3
Task/Arrays/Apex/arrays-1.apex
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Integer[] array = new Integer[10]; // optionally, append a braced list of Integers like "{1, 2, 3}"
|
||||
array[0] = 42;
|
||||
System.debug(array[0]); // Prints 42
|
||||
4
Task/Arrays/Apex/arrays-2.apex
Normal file
4
Task/Arrays/Apex/arrays-2.apex
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
List <Integer> aList = new List <Integer>(); // optionally add an initial size as an argument
|
||||
aList.add(5);// appends to the end of the list
|
||||
aList.add(1, 6);// assigns the element at index 1
|
||||
System.debug(list[0]); // Prints 5, alternatively you can use list.get(0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue