Why do I have to cast 0 to byte when the method argument is byte?
<p>Why do I have to cast 0 to <code>byte</code> when the method argument is <code>byte</code>?</p>

<p><strong>Example:</strong></p>

<pre><code>void foo() {
   bar((byte) 0);
}

void bar(byte val) {}
</code></pre>

<p>I know that if the argument is of type long I don't have to cast it, so I'm guessing that Java thinks of mathematical integers as integers runtime.</p>

<p>Doesn't it discourage the usage of byte/short?</p>
