For 1 and 2 error is not thrown because of "final". Because you have declared C1 and S1 as final inside the method, complier is sure that you cant change final value. So there is no error. But if you declare like 'final short s1 = 128;' then complier will throw error because 128 out of range for byte.
posted 12 years ago
I declared long as final too. Was it not a compile time constant as char and byte?