Problems with casting and short parameters in Java
<p>I am trying to understand the following code:</p>

<pre><code>public class A {
   private void doTask()  {    
      doInt(99);
   }   

   public short doInt(short s)  { 
      return 100;
   }   
}
</code></pre>

<p>The code gives a compiler error on line "doInt(99)". </p>

<pre><code>The method doInt(short) in the type A is not applicable for the arguments (int)
</code></pre>

<p>Can someone explain why it's giving me the error.</p>
