how to specify size of arraylist in java code example
Example 1: how to make arraylist of fixed size
List<Integer> arr = Arrays.asList(new Integer[10]);
Example 2: java create arraylist with size
ArrayList<Integer> arr=new ArrayList<Integer>(10);