title: The constructor Polygon(int[], int[], int) is undefined
body: <p>I am trying to figure out why this program is telling me the constructor is undefined for Polygon.  </p>
  
  <p>This is the exception that I get:</p>
  
  <pre><code>     Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
      The constructor Polygon(int[], int[], int) is undefined   
  at test.main(test.java:9) 
  </code></pre>
  
  <p>Class</p>
  
  <pre><code>import java.awt.*;
  import java.applet.*;
  import java.util.*;
  import java.awt.geom.*;
  public class Polygon extends Applet {
  private int[] xpoints = { 0,-10, -7, 7, 10 };
  private int[] ypoints = {-10, -2, 10, 10, -2 };
  
  private Polygon poly;
  
  public void init(){
      poly = new Polygon(xpoints, ypoints, xpoints.length);
  
  }
  }
  </code></pre>