When the size (the number of elements in a vector) equals the capacity
(the potential number of elements in a vector), a new array is allocated
which is larger than the current array, the contents of the current array
is copied to the new array and the capacity is increased accordingly.
kind regards,
Jos
> i want that size to create a new array with already
> specified size.
Vector is legacy, you should use ArrayList.
When you create a Vector you can specify initial capacity and capacity increment. The capacity increment is the amount by which the capacity is increased when the Vector overflows.