Over Riding concept in java
Over Riding concept in java
Same method name same input parameter with different implementation is called method over riding. if in class A we have a method example:
class A{
void methodx(){
sysout(“in class a mtd x”);}
class B extends A{
void method x(){
sysout(“in class b mtdx”);
}
Inheritance is required for method overRiding.
As I’m unable to add image to this post, I will try to show you the image in text from…