Re: setSize ArrayList, when will it come?



Robert Klemme schrieb:

2. Writing a static helper method which uses ArrayList.ensureCapacity()
and a loop which invokes add() or removeRange() depending on whether the
new capacity is larger or smaller.

removeRange is protected, so I cannot use it in a helper.
.