java new new ArrayList size code example Example: java create arraylist with size ArrayList arr=new ArrayList(10);