java init list code example
Example 1: java instantiate list with value
List strings = Arrays.asList("foo", "bar", "baz");
Example 2: java instantiate collection with values
List integerArray = Arrays.asList(2, 41, 42, 48);
Example 3: list java initialize
List myList = new ArrayList();
Example 4: initialise List>
List> list = new ArrayList>();
##or since Java 1.7
List> list = new ArrayList<>();
Example 5: int list java
int[] list = new int[length];