While a primitive variable's type may be saved in a debugging symbol table (javac -g), the type of an expression is a compile-time notion, so there is nothing to
test at execution time.
You can look at the generated bytecode with javap and see what the compiler did with your expression. In this case, it's pretty obvious that
Java created bytecode for a
long expression. Try it yourself.
[ April 12, 2005: Message edited by: Mike Gershman ]