new tasks

This commit is contained in:
Ingy döt Net 2013-04-09 00:46:50 -07:00
parent 2a4d27cea0
commit 80737d5a6a
1194 changed files with 15353 additions and 1 deletions

View file

@ -0,0 +1,4 @@
ArrayList <Integer> list = new ArrayList <Integer>();//optionally add an initial size as an argument
list.add(5);//appends to the end of the list
list.add(1, 6);//assigns the element at index 1
System.out.println(list.get(0));

View file

@ -0,0 +1,3 @@
int[] array = new int[10]; //optionally, replace "new int[10]" with a braced list of ints like "{1, 2, 3}"
array[0] = 42;
System.out.println(array[3]);