Here you can find the source of asList(E[] array)
public static <E> List<E> asList(E[] array)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static <E> List<E> asList(E[] array) { if (isEmpty(array)) { return new ArrayList<>(); }/*from ww w. java 2 s . com*/ return Arrays.asList(array); } private static <E> boolean isEmpty(Collection<E> collection) { return (collection == null || collection.isEmpty()); } private static <E> boolean isEmpty(E[] array) { return (array == null || array.length == 0); } }