Tuesday, 10 July 2018

//Array of ArrayList Demonstration in java
import java.util.*;
public class ArrayOfArrayList
{
  public static void main(String args[])
  {
    ArrayList listArray[] = new ArrayList[2];
 
    ArrayList firstList = new ArrayList();
    firstList.add("Java");   
    firstList.add("Technology");
 
    ArrayList secondList = new ArrayList();
    secondList.add("Govind");   
    secondList.add("Ballabh");
    secondList.add("Khan");

    listArray[0] = firstList;
    listArray[1] = secondList;
 
    System.out.println(listArray[0]);
    System.out.println(listArray[1]);
  }
}





No comments:

Post a Comment