Here you can find the source of stringListToArray(List
public static String[] stringListToArray(List<String> params)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static String[] stringListToArray(List<String> params) { int paramsSize = params.size(); String returnString[] = new String[params.size()]; for (int i = 0; i < paramsSize; i++) { returnString[i] = params.get(i); }//from w ww . j a va2s .co m return returnString; } }