Here you can find the source of createNullElementList(int size)
public static List createNullElementList(int size)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { public static List createNullElementList(int size) { List lst = new ArrayList(size); for (int i = lst.size(); i < size; i++) { lst.add(null);/*from w w w .j a v a 2 s. c o m*/ } return lst; } }