variable argument in java
<pre><code>public class Demo {
    public static String doit(int x,int y)
    {
        return"a";
    }
    public static String doit(int ...val)
    {
        return "b";
    }
    public static void main(String args[])
    {
        System.out.println(doit(4,5));
    }
}
</code></pre>

<p>I have a doubt that why compilier is not showing any error since doit(4,5) is causing ambiguity</p>

<p>When I ru the code ,I get output as a ad not b why?</p>
