• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting value from Vector

 
Anand Karia
Ranch Hand
Posts: 156
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I m using Vector that has following data

100001,450

how can i get data i.e 450 from this vactor that appear after comma.


ANAND
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JDK API JavaDocs are a good place to get answers for this sort of question. From the JavaDOc for a Vector:
 
Mohammed Ajmal
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

As said use the String strVal = vector.get(index) pass the index to it. Use string tokenizer to get the value after comma from string.

Wr,
ajmal
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic