Here you can find the source of convertArrayToList(T[] array)
public static <T> ArrayList<T> convertArrayToList(T[] array)
//package com.java2s; import java.util.ArrayList; public class Main { public static <T> ArrayList<T> convertArrayToList(T[] array) { ArrayList<T> ret = new ArrayList<T>(array.length); for (T t : array) { ret.add(t);/*from w w w. j a v a 2 s . co m*/ } return ret; } }