super is used to call superclass methods and constructors.
Source Code
class Animal {
String name;
Animal(String name) {
this.name = name;
}
}
class Dog extends Animal {
Dog() {
super("Dog"); // Calls the superclass (Animal) constructor
}
}