Here you can find the source of newList(T... objs)
@SafeVarargs public static <T> List<T> newList(T... objs)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { @SafeVarargs public static <T> List<T> newList(T... objs) { List<T> result = new ArrayList<>(objs.length); Collections.addAll(result, objs); return result; }/* w ww . j a va 2 s . c om*/ }