Here you can find the source of arrayToArraylist(T[] array)
public static <T> ArrayList<T> arrayToArraylist(T[] array)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { public static <T> ArrayList<T> arrayToArraylist(T[] array) { ArrayList<T> ret = new ArrayList<T>(); for (T e : array) { ret.add(e);//from w w w .java 2 s . c om } return ret; } }