if you want to use Collections.fill(list, obj); in order to fill the list with a repeated object alternatively you can use
ArrayList<Integer> arr=new ArrayList<Integer>(Collections.nCopies(10, 0));
the line copies 10 times 0 in to your ArrayList