Thursday, January 5, 2012

Android String to double

Android from String to double

       String sNum = "9.9";
       double dNum = 0;
       try {
              dNum = Double.parseDouble(sNum);
       } catch(NumberFormatException nfe) {
          Log.e("TAG", "Could not parse " + nfe);
       }

                    

No comments:

Post a Comment