Note: This article is an adaption (may be a mirror) of the article originally posted at Edujini™ Eduzine™ here.
All the three articles of the series:
Polymorphism literally means "multiple forms". In OOAD, it means that an object reference can take different behave differently depending upon the scenario.
Technically, there are two types of polymorphism - compile-time polymorphism and runtime polymorphism. One of the ways to implement compile-time polymorphism is method overloading while runtime polymorphism can be implemented by method overriding.
The downloads are available in the Downloads area.
arguments. Let's redefine the same method to access all parameters passed to it, convert each into number and return the their sum (if they are not NaN).
arguments if of the type
Arguments. Apart from other properties, one critical thing to which it provides access to is all the parameters passed to the function while invoking it.
Though it may sound unusual for those who are used to working with languages like C, C++, Java, C# etc but probably they can relate this to
varargs. And the same mechanism is available for instance methods (for custom types) as well.
Method overriding? Haven't we already discussed this in the previous article while discussing about inheritance?