Monday, December 31, 2007

Why static methods can't be abstract?

An abstract method requires implementation per instance. Static methods pertain to an overall class. A static method in an abstract class belongs to the abstract class, not potential implementations. It therefore doesn't make any sense to allow abstract static methods. Furthermore, static methods cannot be overridden, so again, abstract static methods would be an anomaly.

No comments: