Keyword super in Java
class Vehicle { void startEngine() { System.out.println(“Starting the engine…”); } void stopEngine() { System.out.println(“Stopping the engine…”); } } class Car extends Vehicle { void move() { System.out.println(“The car is moving…”); } void invoke() { super.startEngine(); move(); super.stopEngine(); } } class TestSuper2 { public static void main(String args[]){ Car car = new Car(); car.invoke(); } }…
Read More Keyword super in Java