Here you can find the source of cloneStringList(List
private static List<String> cloneStringList(List<String> list)
//package com.java2s; /******************************************************************************* * Copyright (c) 2014 Salesforce.com, inc.. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * /* ww w . j a v a2 s .com*/ * Contributors: * Salesforce.com, inc. - initial API and implementation ******************************************************************************/ import java.util.ArrayList; import java.util.List; public class Main { private static List<String> cloneStringList(List<String> list) { List<String> copiedList = new ArrayList<String>(); for (String s : list) { copiedList.add(s); } return copiedList; } }