Either I\'m doing this wrong or i\'m not understanding how this method works.
ArrayList a = new ArrayList(); a.ensureCapacity(200
Once again JavaDoc to clarify the situation:
Throws: IndexOutOfBoundsException - if index is out of range (index < 0 || index > size()).
Note that size() returns the number of elements currently held by the List.
size()