Here you can find the source of asList(T... args)
public static <T> List<T> asList(T... args)
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { public static <T> List<T> asList(T... args) { ArrayList<T> rv = new ArrayList<T>(); for (T a : args) { rv.add(a);//www.j av a 2s.c om } return rv; } }