Skip to content
Advertisement

Tag: overriding

Calling super super class method

Let’s say I have three classes A, B and C. B extends A C extends B All have a public void foo() method defined. Now from C’s foo() method I want to invoke A’s foo() method (NOT its parent B’s method but the super super class A’s method). I tried super.super.foo();, but it’s invalid syntax. How can I achieve this?

Advertisement