Example JAVA Code

23 Haz 2012





public class Coordinates {
private int x;
private int y;



public Coordinates(int x, int y) {
this.x = x;
this.y = y;
}

public int getX() {
return x;
}

public int getY() {
return y;
}

public void setCoordinates(int x, int y) {
this.x = x;
this.y = y;
}
public boolean equals(Coordinates coordinates) {
if (coordinates.x == this.x && coordinates.y == this.y) {
return true;
} else {
return false;
}

}
public String toString(){
return "X : "+this.x+" ; Y : "+this.y;
}


}

3 yorum

  1. Merhb, bu bşr test yorumdur.Bu yorumu hala okuyorsan bence bırak çünkü okman gereken bir yorum değil bu.Sadece burayı doldurmak amacı, hala okuyorsan bence bilgisayarı kapat.

    YanıtlaSil