SyntaxFix
Write A Post
Hire A Developer
Questions
You could roll your own, but it's just as easy to use commons lang's StringUtils.isNumeric() method. It uses Character.isDigit() to iterate over each character in the String.
StringUtils.isNumeric()