class A { public void method1() { System.out.println("A"): } }
class B extends A { public void method1() { System.out.println("B"); } } class C extends B { public void method1() { super.method1();// but here i want call class A's method1 } }
I know the interface has one major adv over abstract class i.e interface -> a class can implement more than one interface abstract class -> a class can extend only one abstract class apart from this is there any major advantage of using interface instead of abstract class.