Java Method Overriding

 Method Overriding

 

Let us compare  a Man and a Monkey.



  • Changing the body of a Method passed from a super class to a sub class is called Method Overriding.


Example 👇


  • Here the class called Man is Inherited from the class called Monkey.












Comments

Popular posts from this blog

Java Polymorphism

Java Inheritance