Convert String to double in Java

后端 未结 14 1476
傲寒
傲寒 2020-11-22 05:52

How can I convert a String such as \"12.34\" to a double in Java?

14条回答
  •  有刺的猬
    2020-11-22 06:38

    String double_string = "100.215";
    Double double = Double.parseDouble(double_string);
    

提交回复
热议问题