Here you can find the source of arrayListToArray(ArrayList
public static String[] arrayListToArray(ArrayList<String> input)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { public static String[] arrayListToArray(ArrayList<String> input) { String[] returnedArray = new String[input.size()]; for (int i = 0; i < input.size(); i++) { returnedArray[i] = input.get(i); }/* w ww . jav a 2s .c o m*/ return returnedArray; } }