H! Terry, yah, its true that static methods can not be overridden, but they may be shadowed in the subclass by defining the same method with same name, return type, arguments and static keyword ofcourse. The method in the superclass becomes shadowed by the method in the subclass.
------------------ Graaaasp the Concepts and Graaaab SCJP. :Anil Kollur:
Everyday is a Learning phase! Hence ask "What have I learnt today?"
Hi Terry.RHE says that static methods cannot be overriden because they do not participate in runtime polymorphism.That is , if i have code that looks like
then the method in class A will be called and not the one in class B.Since static members belong to a class and not to a particular object,the static method will be called according to reference. Thus the static method in child class will HIDE the method in base class,and not override it. I hope I have been clear enough. ------------------ Come on in !! Drinks are on the house in the Big Moose Saloon !! [This message has been edited by Udayan Naik (edited November 08, 2000).]
Udayan Naik<BR>Sun Certified Programmer for the Java 2 Platform