superThe keyword super refers to the superclass of the current class. class Rectangle extends Shape {
int width, height;
Rectangle () {
this(0, 0, 1, 1); // call another constructor
}
Rectangle(int x, int y, int width, int height) {
super(x, y); // call super class constructor
// must be the 1st statement in the constructor
this.width = width;
this.height = height
}
. . .
} |