In chap-5,pg324 of K&B it is given that
"a case constant must evaluate to the same type as the switch expression can use,with one big constraint:the case constant must be a compile time constant!Since the case argument has to be resolved at compile time,that means u can use only a constant or final variable that is assigned a literal value.It is not enough to be final, it must be a compile time constant"For Example:
I am not able to understand what is a compile time constant...here why is
b not considered a compile time constant...and how do we come to know which is a compile time constant
Plz help!
[ April 03, 2006: Message edited by: nivi zal ]