This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Chris, Static methods are attached to classes instead of instances. Hence they don't exhibit polymorphism and the term "override" does not fit into the semantics of static methods. When you re-declare a parent non-static method as a static method in the subclass, you will be hiding the instance method in the parent class which is illegal. You will get the following compilation error StaticOverrideDemo.java:8: The static method void doSomething() declared in clas s Sub cannot hide the instance method of the same signature declared in class Ba se. It is illegal to hide an instance method.
Hope this helps, Ajith
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).