Here you can find the source of createList(T... params)
public static <T> ArrayList<T> createList(T... params)
//package com.java2s; // License: https://servicestack.net/bsd-license.txt import java.util.ArrayList; import java.util.Arrays; public class Main { public static <T> ArrayList<T> createList(T... params) { ArrayList<T> to = new ArrayList<T>(); to.addAll(Arrays.asList(params)); return to; }/*from w w w .j av a2s . c o m*/ }