you have to refer JLS section given at
http://docs.oracle.com/javase/specs/jls/se7/html/jls-5.html#jls-5.2
basically this has to do with what JLS calls Assignment conversion. assignment conversion occurs when the expression on right hand side is converted to type of variable on left hand side. assignment conversion uses one of the following context
1. identity conversion
2. widening primitive conversion
3. widening reference conversion
4. boxing conversion optionally followed by widening reference conversion
5. unboxing conversion optionally followed by widening primitive converion
if expression on rhs is a compile time constant of the type byte, short char, int a narrowing conversion will occur if
a) the variable is of type byte, short , char and the expression is assignable to the respective types
narrowing conversion followed by boxing will occur if the type of variable is of type Byte, Short , Char and the expression if assignable to the respective variables
when you did byte a =6; // 6 is an int literal but since it is a compile time constant(and within byte range) narrowing conversion occurs
again byte b = 4; // same reason
but byte c =a +b; now the expression viz a + b is NOT compile time constant expression. however if you do
final byte a = 6;
final byte b = 4;
byte c = a+ b; // now it wont give compile error since a+b is compile time constant expression