the type char has no functions, as it's a fundamental data type. Whatyou want to do is use wrapper class's functionCharacter.getNumericValue(alpha)