Artem's blog

Thoughts on software

polymorphism

How to access overridden methods of superclass of a superclass in Java?

Let us consider an example: public class Test2 { static class TestClass1 { int x = 1; String test() { return “1″; } } static class TestClass2 extends TestClass1 { int x = 2; String test() { return “2″; } } static class TestClass3 extends TestClass2 { int x = 3; int testX() { return [...]

, , , , , ,