Here you can find the source of asList(T... array)
public static <T> List<T> asList(T... array)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static <T> List<T> asList(T... array) { if (array == null) { return null; }// w w w .j a va 2 s .c o m List<T> list = new ArrayList<T>(array.length); for (T t : array) { list.add(t); } return list; } }