class Shape {
public void draw() {
System.out.println("Shape draw.");
}
}
class Circle extends Shape {
@Override
public void draw() {
System.out.println("Circle draw.");
super.draw(); // Access parent's version of draw
}
}
public class Main {
public static void main(String[] args) {
Circle c = new Circle();
// The below prints:
// Circle draw.
// Shape draw.
c.draw();
}
}