Over Riding concept in java

Over Riding concept in java

5/5 - (1 vote)

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.

You may also like...

Leave a Reply