check if char is a digit jaava code example Example: check if char is number java Character.isDigit(str.charAt(i));