Thursday, January 5, 2012

Android String to int

Android from String to int

 
              String sNum = "9";
              int iNum = 0;
              try {
                            iNum = Integer.parseInt(sNum);
              } catch(NumberFormatException nfe) {
                 Log.e("TAG", "Could not parse " + nfe);
              }

No comments:

Post a Comment