how to check if a character is a num or string code example Example: check if char is number java Character.isDigit(str.charAt(i));