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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing a string data type to a double data type

Status
Not open for further replies.

JTan

Technical User
Oct 9, 2001
73
SG
How do I write the codes for the following:

StringTokenizer arrival = new StringTokenizer(arrival_note);
arr_id = arrival.nextToken();
arr_time=arrival.nextToken();

arr_id and arr_time are two variables that are of double data type.
How do I convert the arrival.nextToken to a double data type?
 
You can use the static method

Double.parseDouble(String)

Cheers.

Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top