Solved

converting string to double

Posted on 2001-09-17
1
191 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Impossible to extract MSI from new JAVA releases 2 48
java 8 lambda expresssions exception handling 3 75
jar file executable 12 42
servlet filter example 37 42
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

920 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

15 Experts available now in Live!

Get 1:1 Help Now