public class Punto {
int x;
int y;
public Punto (int x, int y){
this.x=x;
this.y=y;
public Punto(y, y){
this(-1,-1); //Llamada al otro constructor
}
}
}
Capa 2
package Visualización;
import Datos.Punto;
public class Rumpunto {
Punto pun1= new Punto();
Punto pun2= new Punto(2,3);
}
No hay comentarios.:
Publicar un comentario