Yes I also searched a lot in JLS 8 but couldn't find that... will try once again for sure.Campbell Ritchie wrote:Neither of those two links seems to give any explanation why static interface methods are not inherited.
Campbell Ritchie wrote:I think the same problem can arise with abstract methods with the same signature and different return type.
Paul Clapham wrote:But then wouldn't the same problem arise with default methods?
That Oracle tutorial wrote:If two or more independently defined default methods conflict, or a default method conflicts with an abstract method, then the Java compiler produces a compiler error. You must explicitly override the supertype methods.
Paul Clapham wrote:...the compiler can't force you to override the supertypes' static method.
Paul Clapham wrote:Here's a possible reason why: Interface methods, whether default or not, can be overridden by abstract methods in an implementing class.
In addition to default methods, you can define static methods in interfaces. This makes it easier for you to organize helper methods in your libraries; you can keep static methods specific to an interface in the same interface rather than in a separate class.
Julian West wrote:
Hence, to be precise, we cannot use "inherits, overrides" interchangeably with "visible, is hidden", correct?
and this discussion is explicitly talking about the JLS, so this is probably not a good topic to use as an example (evidence) to continue the debate...An interface does not inherit static methods from its superinterfaces.
There exist, indeed, certain general principles founded in the very nature of language, by which the use of symbols, which are but the elements of scientific language, is determined. To a certain extent these elements are arbitrary. Their interpretation is purely conventional: we are permitted to employ them in whatever sense we please. But this permission is limited by two indispensable conditions, first, that from the sense once conventionally established we never, in the same process of reasoning, depart; secondly, that the laws by which the process is conducted be founded exclusively upon the above fixed sense or meaning of the symbols employed.
— George Boole, An Investigation of the Laws of Thought