Skip to content

Instantly share code, notes, and snippets.

@a6y3ap
Created January 3, 2019 20:57
Show Gist options
  • Save a6y3ap/d24cf2e7f68ba8573605ab353d7713a1 to your computer and use it in GitHub Desktop.
Save a6y3ap/d24cf2e7f68ba8573605ab353d7713a1 to your computer and use it in GitHub Desktop.
Check if string is a valid number (Java)
static boolean isValid(String value) {
try { new java.math.BigInteger(value); }
catch (Exception e) { return false; }
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment