Java examples for java.util:List Creation
Create new Array List
//package com.java2s; import java.util.ArrayList; import java.util.Collection; public class Main { public static void main(String[] argv) { System.out.println(newArrayList()); }//from w w w. j av a 2s .co m public static <E> ArrayList<E> newArrayList() { return new ArrayList<E>(); } public static <E> ArrayList<E> newArrayList( final Collection<? extends E> c) { return new ArrayList<E>(c); } public static <E> ArrayList<E> newArrayList(final int initialCapacity) { return new ArrayList<E>(initialCapacity); } }