There is nothing wrong with your code. Since term is an instance of Character you could even assign it directly without casting as char op = term if you are using jdk 1.5+
One possibility i could see is the compiler compliance level used. You might have a JDK 1.5+ but you are compiling your project in a lower level. If you are using eclipse check for JDK compliance level in Project->properties->Java Compiler
If you are directly compiling or using Ant build check for -source & -target options.
And just for your info, as far as i know Object to primitive casting was introduced in JDK 1.7. So if you are using JDk 1.7+ you could wirte as
Object term = 'C';
char op = (char) term;