java static binding and polymorphism
问题 I am confused with the static binding example below. I reckon that S2.x and S2.y shows static binding as they prints out the fields according to s2 's static type. And S2.foo() makes s2 call the foo method in the super class, as foo is not over ridden in the subclass. However with S2.goo() , isn't it supposed to call the goo() method in the Test1 subclass? Like it's polymorphism? How come it's static binding? It looks like S2.goo() calls the Super Class goo() method and prints out =13 . Many