Java Vector setSize(int newSize) Method Example

The setSize(int newSize) method of java.util.Vector class will sets the size of the vector. If the new size is greater than the current size, new null items are added to the end of the vector. If the new size is less than the current size, all components at index newSize and greater will be discarded.

[Read more…]