It's probably because the compiler knows that if final 'i' with value 100 can not change and therefore will definetely fit into a byte, but if it wasn't final it could be assigned another much larger value that wouldn't.
Not 100% but that's what it would lead me to think.
When variable i is declared as final, compiler knows what value it shall have at runtime, and in this case it is 100 which is in range of byte primitive -128 to 127. So no compile time error.
However if you remove word final, some other value might have been assigned to variable i before value of i is assigned byte b, so explicit time cast is required this time. Same thing, if you change value of i to be more than 127 even if it is final.
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
how do I do my own kindle-like thing - without amazon