How to access a superclass method from a nested class?
- by m01
I hope this code explains the problem:
class Foo {
void a() { / *stuff */ }
}
class Bar extends Foo {
void a() { throw new Exception("This is not allowed for Bar"); }
class Baz {
void blah() {
// how to access Foo.a from here?
}
}
}
I know that I may be doing something wrong, because inheritance perhaps shouldn't be used in such way. But it's the easiest way in my situation. And, beside that, I'm just curious. Is it possible?