I'm having trouble understanding something about the following code. When run as is, the result is:
I understand that static methods are not overridden, just hidden by the subclass, so which method being invoked is determined at compile time. In this case, the Parent.get1() method is invoked by the inherited get() method of subclass
Test, but it knows to use the overridden Test.get2() method.
However, if you change the last line to
the result is
Huh? I'm confused as to how the get() method is using the Parent.get1() method, but when calling Test.get1() it uses the hidden static get1() method in the Test class.