The super keyword refers to the parent class. You use it inside a child class to call the parent's version of a method or to access a parent field that the child has hidden.
public class Animal {
String type = "Animal";
void describe() {
System.out.println("I am an " + type);
}
}
public class Dog extends Animal {
String type = "Dog";
void describe() {
super.describe();
System.out.println("Specifically, a " + type);
}
}
Calling super.describe() runs the parent's version. Without super, the describe() call would recursively call the child's own method and you'd get a stack overflow.