Here you can find the source of copyStringList(List
private static ArrayList<String> copyStringList(List<String> l1)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { private static ArrayList<String> copyStringList(List<String> l1) { if (l1 == null) { return null; }//from www . j a va 2 s. c o m ArrayList<String> l2 = new ArrayList<String>(l1.size()); for (String str : l1) { l2.add(str); } return l2; } }