user496949
user496949

Reputation: 86075

Java question about super

If A extends B, then I know I can user super.* to access B's method.

What if A extends B and B extends C, how to access C's method from A?

Upvotes: 0

Views: 125

Answers (2)

Piotr Findeisen
Piotr Findeisen

Reputation: 20720

If a method is overriden in B, you cannot "bypass" it.

It's not possible even when using reflection (not in any way known to me).

Upvotes: 8

user635064
user635064

Reputation: 6247

not sure but I think you can do super.super.methodA ?

Upvotes: -1

Related Questions