Here you can find the source of convertStringArrayListToArray(ArrayList
public static String[] convertStringArrayListToArray(ArrayList<String> al)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static String[] convertStringArrayListToArray(ArrayList<String> al) { String[] temp = al.toArray(new String[0]); String[] list = new String[temp.length]; System.arraycopy(temp, 0, list, 0, temp.length); return list; }//from w ww.j av a 2 s .co m }