1ArrayList<String> list=new ArrayList<String>();//Creating arraylist
2 list.add("Mango");//Adding object in arraylist
3 list.add("Apple");
4 list.add("Banana");
5 list.add("Grapes");
6 //Printing the arraylist object
7 System.out.println(list);