Since you are using final constants and adding them up and assigning them to a byte variable, the checking is performed at compile time itself since they are constant evaluations. And since the addition operation goes out of range you get a compiler error.
Joined: Aug 16, 2006
thanks for reply, chetan
you mean that if i add variables (which are not final) then the addition is performed at runtime otherwise at compile time.