1import java.util.ArrayList;
2
3 //Integer ArrayList
4ArrayList<Integer> aList = new ArrayList<Integer>();
5
6aList.add(5);
7aList.add(11);
8aList.add(17);
9
10System.out.println("Integer Number Added in ArrayList= " + aList);
11
12//String ArrayList
13ArrayList<String> sList = new ArrayList<String>();
14
15sList.add("Learning");
16sList.add("JAVA");
17
18System.out.println("String Added in ArrayList= "+ sList);