Here you can find the source of convertStringListToArray(List
public static String[] convertStringListToArray(List<String> list)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static String[] convertStringListToArray(List<String> list) { if (list == null) { return new String[0]; }//from w w w . j a v a 2 s . co m // create new String array String array[] = new String[list.size()]; // iterate through list for (int i = 0; i < list.size(); i++) { // get string and set to array array[i] = list.get(i); } return array; } }