SCJP 6.0 90%
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Wouter Oet wrote:That is because the value after case needs to be a compile time constant and x2 is not because wrapping happens at runtime. If you change it to a int it works just fine.
SCJP 1.6 (94%)