Here you can find the source of array2list(String[] array)
public static List<String> array2list(String[] array)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { public static List<String> array2list(String[] array) { List<String> list = new ArrayList<>(array.length); for (String value : array) { list.add(value);//from w w w.j a v a 2 s . c o m } return list; } }