class Shape {
private int row;
private int column;
public Shape(int row, int column){
this.row = row;
this.column = column;
}
protected void rectangle(){
if(this.row == this.column)
System.out.println("This shape is a square.");
else
System.out.println("This shape is a rectangle.");
}
}
Comments
Leave a comment