Vector(int initialCapacity) 
          Constructs an empty vector with the specified initial capacity and with its capacity increment equal to zero.这是JAVA的JDK API文档里面的相关说明,参数是Vector的初始大小,而不是最大大小!

解决方案 »

  1.   

    Vector() 
              Constructs an empty vector so that its internal data array has size 10 and its standard capacity increment is zero. 
    Vector(Collection c) 
              Constructs a vector containing the elements of the specified collection, in the order they are returned by the collection's iterator. 
    Vector(int initialCapacity) 
              Constructs an empty vector with the specified initial capacity and with its capacity increment equal to zero. 
    Vector(int initialCapacity, int capacityIncrement) 
              Constructs an empty vector with the specified initial capacity and capacity increment. 
    一共就这四个构造函数。
      

  2.   

    Vector(int initialCapacity) 
    是指的初始化的大小,如果你要做到限制大小,可以自己写一个类实现。