Java ArrayList Create createArrayListOfArrayList(int size)

Here you can find the source of createArrayListOfArrayList(int size)

Description

create Array List Of Array List

License

Open Source License

Declaration

public static <E> ArrayList<ArrayList<E>> createArrayListOfArrayList(int size) 

Method Source Code


//package com.java2s;
import java.util.ArrayList;

public class Main {
    public static <E> ArrayList<ArrayList<E>> createArrayListOfArrayList(int size) {
        ArrayList<ArrayList<E>> arrayList = new ArrayList<ArrayList<E>>(size);
        for (int i = 0; i < size; i++) {
            arrayList.add(new ArrayList<E>());
        }// w w  w  . ja va 2  s.c o  m
        return arrayList;
    }
}

Related

  1. createArrayList(Iterable items, int size)
  2. createArrayList(Object[] a)
  3. createArrayList(String[] a)
  4. createArrayList(T... objects)
  5. createArrayListFilledIncrement(int count)
  6. getArrayList()
  7. getArrayList()
  8. getArrayList()
  9. getArrayList(final Object o, final Class clazz)