create arraylist with size 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);
List<Integer> arr = Arrays.asList(new Integer[10]);
ArrayList<Integer> arr=new ArrayList<Integer>(10);