Why Java does not allow overriding a static method?
0
To override a method, you need an instance of a class. Static method is not associated with any instance of the class. So the concept of overriding does not apply here.
Therefore, Java does not allow overriding a static method.
Post a Comment