PR1/settergetter/Point.java

27 lines
266 B
Java

public final class Point{
//Instanzvariablen
private final double x;
private final double y;
//Konstruktor
Point(double x1, double y1){
this.x = x1;
this.y = y1;
}
//Methoden
public double getX(){
return this.x;
}
public double getY(){
return this.y;
}
}