You are pretty much right. The confusion will come in if you try to call one of the static methods from an instance (which is why
you should always call from a Class). If you:
the method in ClassA will be called, but make one little change:
and the method in ClassB will be called. This is because the method is chosen at compile time based on the type of the reference not the type of the object. You will also get similar behaviour with non-static methods that are overloaded take a different type of parameter such as:
I hope I helped more than confused.
