ho questo listato e non trovo l'errore qualcuno mi può aiutare???![]()
class Punto {
public int x;
public int y;
public Punto (int x, int y) {
this.x = x;
this.y = y;
}
}
class PuntoA extends Punto {
private int z;
public PuntoA (int x, int y,int z) {
this.x = x;
this.y = y;
this.z = z;
}
public static void main(String[] args) {
PuntoA p1 = new PuntoA (1,5,0);
System.out.println("("+p1.x+","+p1.y+","+p1.z+")") ;
}
}