In both cases, the result of the expression on the right side of the equals sign is an int. The difference is in trying to assign that int result to the byte variable on the left side of the equals sign.
In the case of byte a = 1 + 1; int literals are being added, and so the result is known at compile time. In particular, the compiler "knows" that the int result is within the range of a byte, and so it's okay.
But in the case of byte a = q + z; int variables are being added, and so the result cannot be known at compile time. Therefore, the compiler has no way of "knowing" whether the result will be within the range of a byte. (Actually, "variables" would be okay, if they are final with their values known at compile time. See this thread.) [ August 29, 2006: Message edited by: marc weber ]
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org