Here you can find the source of sizedArrayList(final int size)
Parameter | Description |
---|---|
T | Formal type parameter |
size | Array list size |
public static <T> ArrayList<T> sizedArrayList(final int size)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { /**// w w w . j a v a 2s .c o m * Returns a sized array list of type {@code T}. * * @param <T> Formal type parameter * @param size Array list size * @return Array list of type {@code T} */ public static <T> ArrayList<T> sizedArrayList(final int size) { return new ArrayList<T>(size); } }