For static methods, overloading is still used to determine the signature of the method to invoke
But what if superclass and subclass both have static method with same signature?
Calling static methods on classes:
Object testObject =newObject();
Calling static methods on instances (note that this will generate compiler warnings):
StaticSuper staticSuper =newStaticSuper();
StaticSub staticSub =newStaticSub();
StaticSuper staticSubAsSuper = staticSub;
staticSubAsSuper.testStaticMethod(testObject);// super (!!!)
No overriding here! Instead, we get method hiding.
Can be pretty confusing (not only the method hiding itself, but also the fact that we call a static method in a way that makes it look like an instance method), which is also why we get warnings when doing this.