Java tutorial
//package com.java2s; import java.util.ArrayList; public class Main { public static <T> ArrayList<T> newArrayList() { return new ArrayList<T>(); } @SafeVarargs public static <T> ArrayList<T> newArrayList(T... values) { ArrayList<T> list = new ArrayList<T>(values.length); for (T t : values) { list.add(t); } return list; } }