Here you can find the source of newArrayList()
public static <T> ArrayList<T> newArrayList()
//package com.java2s; // Metawidget (licensed under LGPL) import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; public class Main { /**/*w ww.j a v a 2 s.c o m*/ * Type-safe initializer. */ public static <T> ArrayList<T> newArrayList() { return new ArrayList<T>(); } /** * Type-safe initializer. */ public static <T> ArrayList<T> newArrayList(Collection<T> collection) { return new ArrayList<T>(collection); } /** * Type-safe initializer. */ public static <T> ArrayList<T> newArrayList(int capacity) { return new ArrayList<T>(capacity); } /** * Type-safe initializer. */ public static <T> ArrayList<T> newArrayList(T... array) { if (array == null) { return new ArrayList<T>(); } return new ArrayList<T>(Arrays.asList(array)); } }