static fields and inheritance
Hi All,
I have simple question.
Say I have super class X and a static method named show.
Now I have sub class Y that extends X and also overrides the method show.
Next I creat object of type X
Y y = new Y....
X x = y;
x.show() calss to the static method of X not that of Y!. why? I mean according to polymorphism the method that should be called is that of y because x actually references to its subclass
Thank u in advance
Eyal

