Here you can find the source of copy(List
Parameter | Description |
---|---|
list | A list containing some values |
public static <T> List<T> copy(List<T> list)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { /**/*from w w w . j a v a 2 s . co m*/ * Returns a copy of the given list * @param list A list containing some values * @return A copy of the given list */ public static <T> List<T> copy(List<T> list) { return new ArrayList<T>(list); } }