Determine if a string is numeric: Difference between revisions

m
→‎[[Java]]: catch NumberFormatException instead of Exception
m (→‎[[Java]]: made a function)
m (→‎[[Java]]: catch NumberFormatException instead of Exception)
Line 49:
return true;
}
catch (ExceptionNumberFormatException e) {
// s is not numeric
return false;
Anonymous user