package Devmanuals.com; import java.util.List; import java.util.ArrayList; import java.util.LinkedList; public class ListAddAllIndex { public static void main (String args []){ List al =new ArrayList(); al.add("A"); al.add("B"); al.add("E"); System.out.println("Elements of list1 are : " + al); System.out.println("Size of list1 is : "+ al.size()); List ll=new LinkedList(); ll.add("C"); ll.add("D"); System.out.println("Elements of list2 are : "+ ll); System.out.println("Size of list2 are : "+ ll.size()); boolean bl= al.addAll(2,ll); System.out.println("The list after addition : "+al); System.out.println("Is the value added to the list TRUE/FALSE : "+bl); System.out.println("Size of list after addition : "+al.size()); } }