Here you can find the source of listToStrArray(List list)
public static String[] listToStrArray(List list)
//package com.java2s; //License from project: Open Source License import java.util.Iterator; import java.util.List; public class Main { public static String[] listToStrArray(List list) { if (list != null) { String curStr[] = new String[list.size()]; int n = 0; for (Iterator j = list.iterator(); j.hasNext(); n++) { curStr[n] = (String) j.next(); }// www .j a v a 2s . com return curStr; } return null; } }