Here you can find the source of toList(Object[] array)
public static List toList(Object[] array)
//package com.java2s; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { public static List toList(Object[] array) { List list = Collections.EMPTY_LIST; if (array != null) { list = new ArrayList(array.length); for (int i = 0; i < array.length; i++) { list.add(array[i]);//from w w w .j a va 2 s. co m } } return list; } public static List toList(Object obj) { ArrayList list = new ArrayList(1); list.add(obj); return list; } }