Here you can find the source of createList(T... array)
public static <T> ArrayList<T> createList(T... array)
//package com.java2s; // The license under which this software is released can be accessed at: import java.util.*; public class Main { public static <T> ArrayList<T> createList(T... array) { ArrayList<T> list = new ArrayList<T>(); for (T t : array) { list.add(t);//from w ww. ja va2s. co m } return list; } }