我正在編寫一個程序,我希望我的對象「this」將是一個Point數組,但是當我運行該程序時出現此錯誤,但我不明白爲什麼。 錯誤 - > DouglasPeucker。 我PROGRAMM:Array Point的構造函數
public class DouglasPeucker {
private double epsilon;
protected Point[] coinImage;
public DouglasPeucker(Point [] tab) {
this.coinImage = new Point[tab.length];
for(int i = 0; i < this.coinImage.length; i++) {
double abscisse = tab[i].getX();
double ordonnee = tab[i].getY();
System.out.println(abscisse + " " + ordonnee);
this.coinImage[i].setX(abscisse);
this.coinImage[i].setY(ordonnee);
}
}
有什麼錯誤? – mre