posted 22 years ago
Hi,
When u use the final modifier, it becomes a compile time constant. Since 100 is within the range of a byte,
it allows the assignment without an explicit cast.
If u remove the final modifier, the value of i cannot be guaranteed to fit into a byte, so the compiler will complain.
Also try compiling the code with i as final with value as 500.
Regards,
Sajida