Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void ensureCapacity(int minimumCapacity)
- Ensures that the capacity is at least equal to the specified minimum. If the current capacity is less than the argument, then a new internal array is allocated with greater capacity. The new capacity is the larger of:
- The minimumCapacity argument.
- Twice the old capacity, plus 2.
- If the minimumCapacity argument is nonpositive, this method takes no action and simply returns.
- Parameters:
- minimumCapacity - the minimum desired capacity.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement