Here you can find the source of convertArrayToList(List
public static List<String> convertArrayToList(List<String> list, String[] strs)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static List<String> convertArrayToList(List<String> list, String[] strs) { if (null == strs) { return new ArrayList<String>(50); }// w w w.j av a 2 s.c om if (null == list) { list = new ArrayList<String>(50); } list.addAll(Arrays.asList(strs)); return list; } }