What is the best and/or easiest way to recognize if a string.charAt(index) is an A-z letter or a number in Java without using regular expressions? Thanks.
Character.isDigit(string.charAt(index)) (JavaDoc) will return true if it's a digit Character.isLetter(string.charAt(index)) (JavaDoc) will return true if it's a letter
Character.isDigit(string.charAt(index))
Character.isLetter(string.charAt(index))
2.1m questions
2.1m answers
60 comments
57.0k users