Here you can find the source of toStringArray(ArrayList
public static String[] toStringArray(ArrayList<String> src)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { public static String[] toStringArray(ArrayList<String> src) { String[] ret = new String[src.size()]; return src.toArray(ret); }/*w w w .j a v a2s.c o m*/ }