The * trimToSize()* method of

*class trims the capacity of the vector to be the vector’s current size. If the capacity of the vector is larger than its current size, then the capacity is changed to equal the size by replacing its internal data array, kept in the field*

**java.util.Vector****elementData**with a smaller one.