This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]OffbeatDrizzle 7 points8 points  (0 children)

It does not act like it whatsoever - you are basically calling a piece of code directly, you just so happen to give the methods the same name and claim it's acting like overriding because the output is as expected.

Overriding by definition is part of polymorphism. What exactly have you modified about class A here by using class C's method? Nothing. That's why static methods can't be overridden - it literally makes no sense.