"Static methods can be overridden by static methods only. " is Wrong, why is "Static methods cannt be overridden by non-static methods" correct ? i dont understand it, hope someone helps!!
why is "Static methods cannt be overridden by non-static methods" correct ? Because compiler won't allow you. "Static methods can be overridden by static methods only. " is Wrong. Because static methods are hidden not overridden. HTH CMIW
------------------ Regards Ravish
"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
I agree with ravish static methods are hidden and are not overridden in subclasses ------------------ coffee drinker ----------------------- Sun Certified Programmer for Java 2 Platform
regards, Amit
coffee drinker and Sun Certified Programmer for Java 2 Platform
Originally posted by ravish kumar: [b]why is "Static methods cannt be overridden by non-static methods" correct ? Because compiler won't allow you. "Static methods can be overridden by static methods only. " is Wrong. Because static methods are hidden not overridden. HTH CMIW [/B]
i know ,just one word : "Static method are not overridden." , is this OK?
The following statements are true.. but I hope someone can elaborate on them.. Static methods are never overridden. They are hidden or shadowed just like fields. Static methods cannot be shadowed by a non-static method and vice versa. Static method can be shadowed by a static method in the subclass. Can anyone one please elaborate what does hidden or shadowed means? What's the difference between the two?
--------------------<p>Karen Leoh<br />Sun Certified Programmer for Java™ 2 Platform
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?