This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets 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.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Getting value from Vector
Similar Threads
Resultset in Collections
performance issue of Vector
display data page vise
Jtable boolean checkboxes
ResultSet Data Manipulation