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))
1.4m articles
1.4m replys
5 comments
57.0k users