Java examples for java.util:List Convert
Generic method to convert array to List
//package com.java2s; import java.util.ArrayList; public class Main { public static <T> ArrayList<T> arrayListOf(T... objects) { final ArrayList<T> list = new ArrayList<T>(); for (T object : objects) { list.add(object);//from w w w . ja va 2s.co m } return list; } }