A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
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,
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: Conversion of Vector() to string
EduardoCobian Q 29
A question about generic type
Using result sets, statements & connections
decimal place formatting JtextField
declaring a new Vector
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014