Java tutorial
//package com.java2s; import java.util.ArrayList; public class Main { public static <T> ArrayList<T> ArrayToList(T[] datas) { ArrayList<T> array = new ArrayList<>(datas.length); for (T t : datas) { array.add(t); } return array; } }