Use the add() method instead of set().  Although the capacity is
initialized, the size of the ArrayList is initially zero so you have
to append the elements to the list, which makes use of the capacity
that was pre-allocated.