Super keyword in java
Super Keyword in Java:- The super keyword in java is a reference variable that is used to refer parent class objects. The keyword “super” came into the picture with the concept of Inheritance Use of super keyword is as followed :- 1. Use of super with variables: 2. Use of super with methods: 3. Use of Super with Constructors 1. Use of super with variables: This scenario occurs when a derived class and base class has same data members. In that case there is a possibility of ambiguity for the JVM. We can understand it more clearly using this code snippet class Animal { String color="white"; } class Dog extends Animal { String color="black"; void printColor() { System.out.println(color); System.out.println(super.color);//prints color of Animal class ...