java check if char in string is numeric code example Example: check if char is number java Character.isDigit(str.charAt(i));