Core Java, Java

Java: Usage of Super Keyword

Use of super with variables: When a derived class and its base/parent class has same member variable names, to refer to the variable of parent class, we use 'super' keyword. This helps in resolving the ambiguity for the JVM. Example: super.maxSpeed Use of super with methods: This is used when we want to call parent… Continue reading Java: Usage of Super Keyword