Integer to byte casting in Java
<p>In Java we can do </p>

<pre><code>byte b = 5;    
</code></pre>

<p>But why can't we pass same argument to a function which accepts <code>byte</code></p>

<pre><code>myObject.testByte(5);
public void testByte (byte b)
{
  System.out.println("Its byte");
}     
</code></pre>

<p>It gives following error  </p>

<pre><code>The method testByte(byte) in the type Apple is not applicable for the arguments (int)
</code></pre>

<p>PS: May be a silly question, I think I need to revise my basics again.  </p>

<p>Thanks.</p>
