Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieve Vector data problems >> elements of elements !!

Status
Not open for further replies.

soldieryap

Programmer
Aug 15, 2000
59
MY
it seems like the 2d array of Vector ...

assume i have a 5 elements String array and one Vector,

after i assign the value to all 5 elements of STRING, i store in 1st element of VECTOR, after that i reassign the value to that 5 elements of STRING, and i store to the 2nd of Vector element. so how do i retrieve each string of them... that's mean i have to retrieve 10 string ..... ??

thanks in advanced ....
 
I am not sure I understand your question but I do know you should at least try to solve it first before posting here. The best way to get help is to come back and say, "I've tried this /code/ and it doesn't work, can anyone tell me why?". That way you are actually learning something instead of being handfeed the answer.

Also please consult the javadocs before posting, 90% of the time the answer is right there. Here is the link to online javadocs, look of String and Vector:

Wushutwist
 
Are you saying that you are storing String arrays as Vector elements?
 
i think he's adding a String[] alright.

add it like this
myVector.add( someIndex, stringArray );

read it like this
myStringArray = ( String[] )myVector.get( someIndex );
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top