import java.util.*;
public class CopyEleOfArraylist{
public static void main(String args[]){
ArrayList<String> colors = new ArrayList<String>();
ArrayList<String> new_array = new ArrayList<String>();
colors.add("Violet");
colors.add("Indigo");
colors.add("Green");
colors.add("Yellow");
colors.add("Orange");
colors.add("Red");
System.out.println("The first array is :"+colors);
new_array.add("1");
new_array.add("2");
new_array.add("3");
new_array.add("4");
new_array.add("5");
new_array.add("6");
System.out.println("The second array is :"+new_array);
// Collections.copy(new_array,colors);
// System.out.println("The copied Array list is :"+new_array);
Collections.copy(colors,new_array);
System.out.println("The copied Array list is :"+colors);
}
}