In this section, we are going to convert a numeric type string value into a double. The double supports big-integer value.
This program simply takes a numeric type string at the console with the "Enter numeric type string value:" message and it converts into a double. The doubleValue() method returns the double value of this double object. And Double class wraps a value of the primitive type double in an object. Finally, it we get the value to be converted into a double.
Here is this the code of this program:
Output of this program given below.
Enter string value:
double d = 23.0
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial
Discuss: Convert String To Double
Post your Comment