naved momin wrote:
Matthew Brown wrote:Marking a method abstract means that you will override it in a sub-class and provide the implementation. A static method cannot be overridden, so it would be impossible to provide the implementation of a static abstract method. So it makes no sense to allow it.
static method cannot be overriden because those methods are for that particular class ?
They cannot be overridden because the language designers decided to make it that way. In some languages (like SmallTalk, I think), static methods can be overridden.
Java's designers had a different model in mind for class, objects, and
polymorphism. It was a language design choice. If you want to know why that choice was made, you'd have to ask them, or see if it shows up in a whitepaper somewhere. A good guess, though, would be that it keeps the language simpler. Simplicity has always been one of Java's key goals.