title: What is an 'ambiguous type' error in Java?
body: <p>In the following code, I get an error from the compiler on the last line that says: 'the type List is Ambiguous' (on the line that attempts to define cgxHist list).  What am I doing wrong?</p>
  
  <pre><code>import java.awt.*;
  import javax.swing.*;
  import java.util.*;
  
  public class drawr extends JPanel{
  
      public static int animationSpeed=470;
      public static int diameter = 50;
      hBod allHBods[];
      List&lt;String&gt; cgxHist = new ArrayList&lt;String&gt;();
  </code></pre>
  
  <p>I actually wanted the list to contain integers, but when I try to 'cast' the list as such, by replacing <code>&lt;String&gt;</code> with <code>&lt;int&gt;</code>, the error on that line becomes 'Syntax error on token "int", Dimensions expected after this token'.  Advice please.</p>