Here you can find the source of newList(T... objects)
public static <T> List<T> newList(T... objects)
//package com.java2s; import java.util.*; public class Main { /**/*from w w w. j a v a 2s . co m*/ * Creates a new list containing the objects in the object array. */ public static <T> List<T> newList(T... objects) { List list = new ArrayList(objects.length); for (Object object : objects) list.add(object); return list; } /** * Adds an object to the given list and returns list (creates list if missing). */ public static <T> List<T> add(List<T> aList, T anObj) { // If list is null, create list if (aList == null) aList = new Vector(); // Add object aList.add(anObj); // Return list return aList; } }