Here you can find the source of newArrayList(E... elements)
public static <E> List<E> newArrayList(E... elements)
//package com.java2s; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { public static <E> List<E> newArrayList(E... elements) { ArrayList<E> list = new ArrayList<E>(elements.length); Collections.addAll(list, elements); return list; }// w w w. j a va2 s . co m }