java arrazlist to arraz code example
Example 1: java array to list
Integer[] spam = new Integer[] { 1, 2, 3 };
List<Integer> list = Arrays.asList(spam);
Example 2: arraylist to java
You can only use the to array method if you convert to any object type.