Here you can find the source of newArrayList(int size)
Parameter | Description |
---|---|
L | type |
size | size |
public static <L> List<L> newArrayList(int size)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { /**//from w ww . ja v a2s. c om * Create new {@link ArrayList}. * * @param <L> type * @param size size * @return {@link ArrayList} */ public static <L> List<L> newArrayList(int size) { return new ArrayList<L>(size); } /** * Create new {@link ArrayList}. * * @param <L> type * @return {@link ArrayList} */ public static <L> List<L> newArrayList() { return new ArrayList<L>(); } }