Here you can find the source of listOf(T... values)
@SafeVarargs public static <T> List<T> listOf(T... values)
//package com.java2s; //License from project: Apache License import java.util.*; import static java.util.Collections.*; public class Main { @SafeVarargs public static <T> List<T> listOf(T... values) { return unmodifiableList(Arrays.asList(values)); }// w w w . jav a 2 s . co m }