An integer is a bigger datatype. Doing something like this
byte b = i;
will give a compilation error because a byte cannot hold more than 8 bits whereas an integer can hold upto 32bits.
Java compiler checks this this type mismatch at run time. So in order to compile and run you need to typecast the statement
byte b = (byte)i;
But in the second case you are declaring i as final. when you decalre a variable as final you cannot change its value afterwards. So i will always be 100 in your case. Since 100 can fit in a byte, the code get's compiled. In the earlier case although you were setting i as 100 but later it is possible to change the value to something bigger which will not fit into byte and so the compiler gave an error.
In the second example set the value of i as 100000
final int i = 100000; and then try. this time compiler will give error.
Hope this helps.