Constructor | Summary |
---|---|
Vector() | Creates an empty vector so that its internal data array has size 10 and its standard capacity increment is zero. |
Vector(Collection<? extends E> c) | Creates a vector containing the elements of the specified collection, in the order they are returned by the collection's iterator. |
Vector(int initialCapacity) | Creates an empty vector with the specified initial capacity and with its capacity increment equal to zero. |
Vector(int initialCapacity, int capacityIncrement) | Creates an empty vector with the specified initial capacity and capacity increment. |
import java.util.Vector;
public class Main{
public static void main(String args[]) {
Vector v = new Vector(2000);
System.out.println(v.capacity());
}
}
The output:
2000
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |