java how to check if a char is n integer code example Example: check if char is number java Character.isDigit(str.charAt(i));