title: Is there a way to work around Ambiguous method call without casting?
body: <h2>Initial Question</h2>
  
  <p>I have the following code:</p>
  
  <pre><code>public static void main(String[] args) throws Exception {
      test(new LinkedList());
  }
  
  public static void test(Queue qeueue){
      System.out.println("Queue");
  }
  
  public static void test(List list){
      System.out.println("List");
  }
  </code></pre>
  
  <p>InteliJ is not letting me run the project.</p>
  
  <ol>
  <li>Is there any way to work around this issue?</li>
  <li>Which of the two would the JVM use if both are equal in specificity? Is it random?</li>
  </ol>
  
  <p>I have read related SO q/a but no one gives an answer how to compile around it. 
  They just list the reason, e.g. <a href="https://stackoverflow.com/questions/35708460/ambiguous-method-call-intellij-15">Ambiguous method call intelliJ 15</a></p>
  
  <h2>Update</h2>
  
  <p>An even more nasty example is:</p>
  
  <pre><code>test(null);
  </code></pre>
  
  <p>I have been reading the article that is quite interesting:  <a href="http://javabypatel.blogspot.be/2016/05/ambiguous-method-overloading.html" rel="nofollow noreferrer">http://javabypatel.blogspot.be/2016/05/ambiguous-method-overloading.html</a></p>