permaculture playing cards
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Getting value from Vector " Watch "Getting value from Vector " New topic

Getting value from Vector

Anand Karia
Ranch Hand

Joined: Sep 25, 2004
Posts: 156

Hi All

I m using Vector that has following data


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


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

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

Joined: Sep 20, 2004
Posts: 29

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.

I agree. Here's the link:
subject: Getting value from Vector
It's not a secret anymore!