title: Compiler error : reference to call ambiguous
body: <p><strong>Case 1</strong></p>
  
  <pre><code>static void call(Integer i) {
      System.out.println("hi" + i);
  }
  
  static void call(int i) {
      System.out.println("hello" + i);
  }
  
  public static void main(String... args) {
      call(10);
  }
  </code></pre>
  
  <p><strong>Output of Case 1 : hello10</strong></p>
  
  <p><strong>Case 2</strong></p>
  
  <pre><code>static void call(Integer... i) {
      System.out.println("hi" + i);
  }
  
  static void call(int... i) {
      System.out.println("hello" + i);
  }
  
  public static void main(String... args) {
      call(10);
  }
  </code></pre>
  
  <p>Shows compilation error <code>reference to call ambiguous</code>. But, I was unable to understand. Why ? But, when I commented out any of the <code>call()</code> methods from <code>Case 2</code>, then It works fine. Can anyone help me to understand, what is happening here ?</p>