With the help of Double.parseDouble() method, you can convert String to double in Java.
Following is the example that will show conversion from String to double-
public class Example { public static void main(String args[]) { String s = "331.4"; double d = Double.parseDouble(s); System.out.println(d); } }
Output
331.4