class a { void show() { } class b extends a { void show() { } class c extends b { //how to call show method of class a } } } Does anyone know how I can call method of class a from class c using super keyword
class a { void show() { } class b extends a { void show() { } class c extends b { //how to call show method of class a } } } Does anyone know how I can call method of class a from class c using super keyword
class A { void show() { System.out.println("A"); } } class B extends A { void show() { System.out.println("B"); } } class C extends B { void show() { super.show(); } } The above code will display "B" when class C object is invoked. In your case, there can be 2 options:
There is no way to call super class methods which are higher than level 1.