Thursday, March 27, 2008

Static methods in java

Overriding does not work for static if you upcast the instance! With a static you'll get the behavior of whatever class you upcast to. Thus you cannot have polymorphic behavior.

No comments: