Here you can find the source of arrayToList(Object[] arr)
public static List<?> arrayToList(Object[] arr)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static List<?> arrayToList(Object[] arr) { List<?> list = new ArrayList<>(); if (arr == null) { return list; }/* ww w . ja v a 2 s .co m*/ list = Arrays.asList(arr); return list; } }