Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Help please

 
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,I need help in implementing this. Any help is appreciated
I have three vectors:Vector v = new java.util.Vector();
v.addElement("first");
v.addElement("second");
v.addElement("third");
v.addElement("Test");
Vector v1 = new java.util.Vector();
v1.addElement("second1");
v1.addElement("second2");
Vector v2 = new java.util.Vector();
v2.addElement("third1");
v2.addElement("third2");
v2.addElement("third3");
Now my aim is to display the values in the vectors( The values will be dynamically coming to the vector)
like this
v1.firstelement
v2.firstelement
v3.firstelement
v1.secondelement
v2.secondelement
v3.secondelement
and so on,,
I am able to do this with 2 vectors, but stuck with 3, any help//
Thanks
 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if I understood your problem. But check out the code below:

Output :
Display
v1 first element 1
v2 first elementI
v3 first elementi
v1 second element 2
v2 second elementII
v3 second elementii
v1 third element 3
v2 third elementIII
v3 third elementiii
 
this is supposed to be a surprise, but it smells like a tiny ad:
Try Free Java/.NET Libraries for Word Excel PowerPoint and PDF
htttp://www.e-iceblue.com/free-apis.html
    Bookmark Topic Watch Topic
  • New Topic