Computer Science, asked by Bhaieab4017, 1 year ago

Why non-static method cannot be overridden as static?

Answers

Answered by Anonymous
5
Static methods cannot be overriddenbecause method overriding only occurs in the context of dynamic (i.e. runtime) lookup of methods. Static methods (by their name) are looked up statically (i.e. at compile-time). Method overriding happens in the type of subtype polymorphism that exists in languages like Java and C++.
Similar questions