superrefers to the immediate parent class and is used to access parent constructors, methods and fields.
class Person {
String name = "Geeks";
}
class Student extends Person {
String name = "Student";
void display() {
System.out.println("Child Name: " + this.name);
System.out.println("Parent Name: " + super.name);
}
public static void main(String[] args) {
Student s = new Student();
s.display();
}
}