0

Possible Duplicate:
Why is super.super.method(); not allowed in Java?

Class A
Class B extends A
Class C extends B

How can I make a method in class C call the super of class A?

I tried this but it fails...

A.super.someMethod();
Community
  • 1
  • 1
benstpierre
  • 32,833
  • 51
  • 177
  • 288

1 Answers1

2

If you meant to call super.super.someMethod() in Java then simple answer is that you cannot do that. Java intentionally prohibits that because it violates encapsulation.

anubhava
  • 761,203
  • 64
  • 569
  • 643