Package java.util
Class ArrayList

Public Method ensureCapacity

void ensureCapacity(int minCapacity)

Throws:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.

Example

   ArrayList aList = new ArrayList(1);
   aList.ensureCapacity(2);

The example above ensures the capacity of this instance.