Here you can find the source of createList(T... objs)
@SuppressWarnings("unchecked") public static <T> List<T> createList(T... objs)
//package com.java2s; /**// w ww. j av a 2s . c om * @(#)CollectionUtils.java V1.0.0 2015-8-13 ????5:02:10 * * Copyright 2015 www.ifood517.com. All rights reserved. * www.ifood517.com PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ import java.util.ArrayList; import java.util.List; public class Main { @SuppressWarnings("unchecked") public static <T> List<T> createList(T... objs) { List<T> list = new ArrayList<T>(); if (objs != null) { for (T t : objs) { list.add(t); } } return list; } }