A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
this week in the
Conversion of Vector() to string
Joined: Nov 15, 2000
Nov 15, 2000 04:55:00
I am storing names which is in array in a Vector() object.
but after that i want to convert that Vector() back to
i tried using toString(),
but it gives error as wrong arguments.
Is there a way
Joined: Oct 13, 2000
Nov 15, 2000 09:42:00
Vectors store their data as Objects only, so you have to cast back to the object type that you want.
To retrieve you String object, use something like:
This would retrieve the String object that is the first element in the Vector. Vectors, like arrays, are zero-based.
Hope this helps,
I agree. Here's the link:
subject: Conversion of Vector() to string
EduardoCobian Q 29
Using result sets, statements & connections
decimal place formatting JtextField
A question about generic type
declaring a new Vector
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015