Check out example codes for "check if char is number java". It will help you in understanding the concepts better.

Code Example 1

Character.isDigit(str.charAt(i));

Code Example 2

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

Learn ReactJs, React Native from akashmittal.com