Solved

converting string to double

Posted on 2001-09-17
1
190 Views
Last Modified: 2010-03-31
hi,

I know that you can convert a string to an integer by

int q_no;
String q_string = "4";

q_no = Integer.parseInt(q_string);

but I want to convert a string to a double. Any suggestions?

Thanks
Clo
             
0
Comment
Question by:clodaghm
1 Comment
 
LVL 1

Accepted Solution

by:
kanthonym earned 50 total points
ID: 6488063
static Double valueOf(String s)
          Returns a new Double object initialized to the value represented by the specified string.


Double myNum = Double.valueOf( "stringvalue of number" )
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
What is the compatible hibernate version for spring 4.3.1 10 64
strDist challenge 35 84
word0 challenge 4 54
maven example error 3 36
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now