How is final keyword making the difference?
----------------------------
Once a final variable has been assigned, it always contains the same value.
You are giving assurance to the compiler that the values (final short s1 =1;
final char c1=1

will never change. That is the reason you are not getting error.
Hope this is clear.