package Devmanuals.com; import java.util.List; import java.util.ArrayList; public class ListAddLast { public static void main (String[] args){ List ls = new ArrayList(); System.out.println("Initially the size of list is " +ls.size()); System.out.println(ls); System.out.println("After addition of elements (1,2)into the list, the elements are :"); ls.add(1); ls.add(2); System.out.println(ls); System.out.println("The size of list after addition : " + ls.size()); System.out.println("Now insert a new element 'Ram'"); ls.add("Ram"); System.out.println("Then the new Elements of list are : "+ls); System.out.println("And the size of new list = " + ls.size()); } }