Here you can find the source of newList(int... sizes)
public final static <V> List<V> newList(int... sizes)
//package com.java2s; //License from project: LGPL import java.util.ArrayList; import java.util.List; public class Main { public final static <V> List<V> newList(int... sizes) { int size = 0; for (int it : sizes) size += it;// www .j a va2 s. c o m return new ArrayList<V>(size); } public final static <V> List<V> newList(List<V> fromList, int... sizes) { int size = fromList.size(); for (int it : sizes) size += it; return newList(size); } }