Here you can find the source of copyList(List source, List destination)
@SuppressWarnings({ "rawtypes", "unchecked" }) public static void copyList(List source, List destination)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { @SuppressWarnings({ "rawtypes", "unchecked" }) public static void copyList(List source, List destination) { destination.clear();/*from w w w . j a va2 s . c o m*/ for (Object o : source) { destination.add(o); } } public static void copyList(byte[] source, List<Byte> destination) { destination.clear(); for (byte o : source) { destination.add(o); } } }