java - The constructor Polygon(int[], int[], int) is undefined -


i trying figure out why program telling me constructor undefined polygon.

this exception get:

     exception in thread "main" java.lang.error: unresolved compilation problem:      constructor polygon(int[], int[], int) undefined    @ test.main(test.java:9)  

class

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);  } } 

it says polygon class must have constructor suitable

new polygon(xpoints, ypoints, xpoints.length); 

see http://docs.oracle.com/javase/tutorial/java/javaoo/constructors.html


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -