title: Byte and char conversion in Java
body: <p>If I convert a  character to <code>byte</code> and then back to <code>char</code>, that character mysteriously disappears and becomes something else. How is this possible?</p>
  
  <p>This is the code:</p>
  
  <pre><code>char a = 'È';       // line 1       
  byte b = (byte)a;   // line 2       
  char c = (char)b;   // line 3
  System.out.println((char)c + " " + (int)c);
  </code></pre>
  
  <p>Until line 2 everything is fine:</p>
  
  <ul>
  <li><p>In line 1 I could print "a" in the console and it would show "È".</p></li>
  <li><p>In line 2 I could print "b" in the console and it would show -56, that is 200 because byte is signed. And 200 is "È". So it's still fine.</p></li>
  </ul>
  
  <p>But what's wrong in line 3? "c" becomes something else and the program prints <code>?  65480</code>. That's something completely different.</p>
  
  <p>What I should write in line 3 in order to get the correct result?</p>