aspose file tools*
The moose likes Beginning Java and the fly likes converting an array of string to double value..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "converting an array of string to double value....." Watch "converting an array of string to double value....." New topic
Author

converting an array of string to double value.....

Philip Zac
Ranch Hand

Joined: Apr 27, 2008
Posts: 66
Hello all,

Is there any way that I can convert a string say ("11, 22, 33") to an array of double values ???

Thanks

Philip
Sid Murrey
Ranch Hand

Joined: Jul 07, 2008
Posts: 58
You could use StringTokenizer with a matching delimiter pattern to split the string according to the commas. Then iterate over the resulting array and use the Double.valueOf() method to convert the Strings to doubles.
[ July 10, 2008: Message edited by: Cedric Meury ]
Philip Zac
Ranch Hand

Joined: Apr 27, 2008
Posts: 66
Thanks alot Cedric Meury ......


Philip
 
wood burning stoves
 
subject: converting an array of string to double value.....