Here you can find the source of listToStringArray(List
public static String[] listToStringArray(List<String> inputList)
//package com.java2s; import java.util.List; public class Main { public static String[] listToStringArray(List<String> inputList) { return inputList.toArray(new String[inputList.size()]); }/*from w w w . j a va 2s. c o m*/ }