Here you can find the source of newArrayList()
public static <T> ArrayList<T> newArrayList()
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.Collections; public class Main { public static <T> ArrayList<T> newArrayList() { return new ArrayList<T>(); }/*from w ww . jav a 2 s .c o m*/ public static <T> ArrayList<T> newArrayList(int initialCapacity) { return new ArrayList<T>(initialCapacity); } public static <T> ArrayList newArrayList(T... ele) { ArrayList list = null; if (null != ele && 0 != ele.length) { list = newArrayList(ele.length); Collections.addAll(list, ele); } return list; } }