Here you can find the source of createArrayList(T... objects)
public static <T> ArrayList<T> createArrayList(T... objects)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Collections; public class Main { /**//from w w w.j a v a2s. c o m * Initializes an ArrayList with objects. * */ public static <T> ArrayList<T> createArrayList(T... objects) { ArrayList<T> arrayList = new ArrayList<T>(); Collections.addAll(arrayList, objects); return arrayList; } }