Thursday, January 5, 2012

Android String to float

Android from String to float  
       String sNum = "9.9";
       float fNum = 0;
       try {
              fNum = Float.parseFloat(sNum);
       } catch(NumberFormatException nfe) {
          Log.e("TAG", "Could not parse " + nfe);
       }

No comments:

Post a Comment