title: Java: byte to int math sum conversion. Identical operation results in both allowed and disallowed action
body: <p>This is about a sum of two ints after a cast to bytes in both operands.
  I'm just trying to understand why the following output works perfectly in Java:</p>
  <pre><code>byte b1 = (byte)128 + (byte)18;   // ok
  System.out.println( b1 );   
  </code></pre>
  <p>and the latter fails at compile-time:</p>
  <pre><code>byte b2 = (byte)110 + (byte)18;  // compile-time error
  System.out.println( b2 );  
  </code></pre>
  <p>They are identical, except from the int values used as operands. In both cases the result is out of range, but only the second snippet will throw compile-time error (altought its result is less than the the previous one).
  Just why is this happening?</p>