Here you can find the source of newArrayList()
public static <E> List<E> newArrayList()
//package com.java2s; /* Copyright c 2005-2012. * Licensed under GNU LESSER General Public License, Version 3. * http://www.gnu.org/licenses/*www. jav a 2 s . co m*/ */ import java.util.ArrayList; import java.util.Collection; import java.util.List; public class Main { public static <E> List<E> newArrayList() { return new ArrayList<E>(); } public static <E> List<E> newArrayList(int initialCapacity) { return new ArrayList<E>(initialCapacity); } public static <E> List<E> newArrayList(Collection<? extends E> c) { return new ArrayList<E>(c); } public static <E> List<E> newArrayList(E... values) { List<E> list = new ArrayList<E>(values.length); for (E e : values) { list.add(e); } return list; } }