-
-
Save TheShubhamVsnv/fd411176974eb63249f38bc0772190ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Super is used to call the constructor or method of the immediate superclass. | |
It is often used in the constructor of a subclass to invoke the constructor of its superclass. | |
*/ | |
public class MyChildClass extends MyBaseClass { | |
public void myMethod() { | |
super.myVirtualMethod(); | |
// Calling the superhero parent! | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment