File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes can I add Vectors together? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "can I add Vectors together? " Watch "can I add Vectors together? " New topic
Author

can I add Vectors together?

Zoe Peng
Ranch Hand

Joined: Nov 27, 2000
Posts: 112
Hi,
I have three vectors in my databean. My question is how can I make addressVector is equal to all the cityVector+ stateVector?
I got convert Vector to int error.
Thanks.
Vector addressVector = this.getAddressList();
Vector cityVector = this.getCityList();
vector stateVector = this.getStateList();
public Vector getAddressList(){return addressList; }
public Vector getCity(){return cityList; }
public Vector getStateList(){return stateList; }
public void setAddressList(Vector arg) { addressList = arg; }
public void setCityList(Vector arg) { cityList = arg; }
public void setStateList(Vector arg) { stateList = arg; }

Kris Nelson
Ranch Hand

Joined: Nov 04, 2001
Posts: 35
I'm assuming that addressList, cityList and stateList are data members of this class. What type/class are they declared as?

------------------
WebNelly.com
Java/XML Web Development
Check it out!
http://www.webnelly.com


WebNelly.com<br />Java/XML Web Development<br />Check it out!<br /><a href="http://www.webnelly.com" target="_blank" rel="nofollow">http://www.webnelly.com</a>
Zoe Peng
Ranch Hand

Joined: Nov 27, 2000
Posts: 112
it's String.
is addAll method can fix this problem?
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can I add Vectors together?