Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

1 Answer
karthikeya Boyini

To convert a String to a double type number in Java, use the Double.parseDouble() method.

Here is our string.

String str = "699.7e130";

Let us now convert the above string to double.

double val = Double.parseDouble(str);

Example

 Live Demo

public class Demo {
   public static void main(String args[]) {
      String str = "699.7e130";
      double val = Double.parseDouble(str);
      System.out.println(val);
   }
}

Output

6.997E132

Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.