一般,vector是用addElement来添加元素的,并且元素一定是对象 你这个是啥清楚吗? ver.add(combin.filed_name()); 给你java doc的英文说明 ----------------------------- add public boolean add(Object o)Appends the specified element to the end of this Vector. Specified by: add in interface List Overrides: add in class AbstractList Parameters: o - element to be appended to this Vector. Returns: true (as per the general contract of Collection.add). Since: 1.2 ---------------------------------------------------- addElement public void addElement(Object obj)Adds the specified component to the end of this vector, increasing its size by one. The capacity of this vector is increased if its size becomes greater than its capacity. This method is identical in functionality to the add(Object) method (which is part of the List interface).Parameters: obj - the component to be added. See Also: add(Object), List
你这个是啥清楚吗?
ver.add(combin.filed_name());
给你java doc的英文说明
-----------------------------
add
public boolean add(Object o)Appends the specified element to the end of this Vector.
Specified by:
add in interface List
Overrides:
add in class AbstractList
Parameters:
o - element to be appended to this Vector.
Returns:
true (as per the general contract of Collection.add).
Since:
1.2
----------------------------------------------------
addElement
public void addElement(Object obj)Adds the specified component to the end of this vector, increasing its size by one. The capacity of this vector is increased if its size becomes greater than its capacity.
This method is identical in functionality to the add(Object) method (which is part of the List interface).Parameters:
obj - the component to be added.
See Also:
add(Object), List