Here you can find the source of toList(E... e)
@SafeVarargs public static <E> List<E> toList(E... e)
//package com.java2s; //License from project: Apache License import java.util.Arrays; import java.util.List; public class Main { @SafeVarargs public static <E> List<E> toList(E... e) { return Arrays.asList(e); }/*from w w w.j a v a 2 s . com*/ }