1import java.util.ArrayList;
2public class Details {
3 public static void main(String[] args) {
4
5 //ArrayList<String> Declaration
6 ArrayList<String> al= new ArrayList<String>();
7 //add method for String ArrayList
8 al.add("Ram");
9 al.add("Shyam");
10 al.add("CPS");
11 al.add("John");
12 al.add("Steve");
13 System.out.println("Elements of ArrayList of String Type: "+al);