Thursday, January 5, 2012

Android String to long

Android from String to long

String sNum = "99999999";
long lNum = 0;
try {
   lNum = Long.parseLong(sNum);
} catch(NumberFormatException nfe) {
   Log.e("TAG", "Could not parse " + nfe);
}

No comments:

Post a Comment