title: Java: why do I receive the error message "Type mismatch: cannot convert int to byte"
body: <p>If you declare variables of type byte or short and attempt to perform arithmetic operations on these, you receive the error "Type mismatch: cannot convert int to short" (or correspondingly "Type mismatch: cannot convert int to byte"). </p>
  
  <pre><code>byte a = 23;
  byte b = 34;
  byte c = a + b;
  </code></pre>
  
  <p>In this example, the compile error is on the third line.</p>