Here you can find the source of stringListToArray(final List
final public static String[] stringListToArray(final List<String> list)
//package com.java2s; // License as published by the Free Software Foundation; either import java.util.List; public class Main { final public static String[] stringListToArray(final List<String> list) { if (list != null) { final String[] str = new String[list.size()]; int i = 0; for (final String l : list) { str[i++] = l;/*from w w w . j a v a2s . c o m*/ } return str; } return null; } }