This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes Getting value from Vector Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Getting value from Vector " Watch "Getting value from Vector " New topic
Author

Getting value from Vector

Anand Karia
Ranch Hand

Joined: Sep 25, 2004
Posts: 156

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


Love is GOD and GOD is Love.
Anand Karia
IT Concretor.......
M/s. Anand Karia Concreting IT
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

The JDK API JavaDocs are a good place to get answers for this sort of question. From the JavaDOc for a Vector:


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Mohammed Ajmal
Greenhorn

Joined: Sep 20, 2004
Posts: 29
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting value from Vector