Here you can find the source of asList(T... args)
public static <T> List<T> asList(T... args)
//package com.java2s; //License from project: Apache License import java.util.Arrays; import java.util.Collections; import java.util.List; public class Main { public static <T> List<T> asList(T... args) { if (args == null || args.length == 0) { return Collections.emptyList(); } else {/*from w ww. ja v a 2 s . co m*/ return Arrays.asList(args); } } }