Hi Ronaldo,Prasad,Madhukar
I want to clarify/"get clarified" on the topic applicability of Inheritance,
Polymorphism to static methods/variables.
You say static methods cannot be inherited thereby cannot be overridden.
I suppose this is not the case. Just compile and run the following code.
Inheritance applies for Static methods/variables.
When it comes to Polymorphism, here is a snippet from K & B book, page 98
Polymorphic method invocations apply only to instance methods. You can
always refer to an object with a more general reference variable type (a superclass
or interface), but at runtime, the ONLY things that are dynamically selected
based on the actual object (rather than the reference type) are instance methods.
Not static methods. Not variables. Only overridden instance methods are
dynamically invoked based on the real object's type. I suppose you agree with me.