This week's book giveaway is in the
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!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
Java in General
Getting value from Vector
Joined: Sep 25, 2004
Oct 27, 2004 23:57:00
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.
M/s. Anand Karia Concreting IT
Joined: Apr 14, 2004
Oct 28, 2004 03:27:00
The JDK API JavaDocs are a good place to get answers for this sort of question. From the JavaDOc for a Vector:
get public Object get(int index) Returns the element at the specified position in this Vector. Specified by: get in interface List Specified by: get in class AbstractList Parameters: index - index of element to return. Returns: object at the specified index Throws: ArrayIndexOutOfBoundsException - index is out of range (index < 0 || index >= size()). Since: 1.2
Joined: Sep 20, 2004
Oct 28, 2004 05:59:00
As said use the
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
display data page vise
Resultset in Collections
performance issue of Vector
ResultSet Data Manipulation
Jtable boolean checkboxes
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014