posted 10 years ago
Why'd you think it is acting as an overriding method. You have only one method definition in your implementation. How is method overriding into picture here?
Example14 is implementing IExample2. So Example14 needs to provide an implementation for the method public void method().
But Example14 also extends Example15 and hence Example14 has the public void method() already defined by the virtue of inheritance. Class Example14, hence, has also
fulfilled the requirement that it provide an 'implementation' for public void method().
Implementing an interface method does not mean you are overriding that method. Overriding happens when your class hierarchy has a method definition available but you provide
another definition. In your example there is only one method definition - the inherited one. So there is no overriding here.
Chan.