abstract classes?
Hi All,
I have a question as below; though I have some answers I need more convincing answers; if any body could clarify:
1. Why static methods can not be abstract?
if the answer is they can not be overridden? why is the language design like that?
Kindly reply.
Regards
Ayusman
A static method is per definition only present in the class it is defined in.
A abstract method is per definition not implemented where it is defined.
Since a static method can not be overriden you can't place the implementation anywhere else but where it's definied.
If you now had a abstract static method you'd have a method that could never be called, since there is nowhere to place the implementation.
I basically said the exact same thing as you said, but maybe it's easier to understand if I write it more verbosely.