converting char to int by -'0 code example Example: char to int int n = Character.getNumericValue(char);