Converting String to Double in Android

前端 未结 8 657
感情败类
感情败类 2020-12-09 02:29

Trying to get double values from an EditText and manipulate them before passing them to another Intent. Not using primitive data type so I can use toString methods.

相关标签:
8条回答
  • 2020-12-09 03:12

    try this:

    double d= Double.parseDouble(yourString);
    
    0 讨论(0)
  • 2020-12-09 03:14
    String sc1="0.0";
    Double s1=Double.parseDouble(sc1.toString());
    
    0 讨论(0)
提交回复
热议问题