Tutorial by Examples

Polymorphism is one of the basic concepts in OOP (Object Oriented Programming). Main idea of the polymorphism is that an object have the ability to take on different forms. To achieve that (polymorphism), we have two main approaches. Method overloading Occures when there are two or more meth...
Method overloading is the way of using polymorphism inside a class. We can have two or more methods inside the same class, with different input parameters. Difference of input parameters can be either: Number of parameters Type of parameters (Data type) Order of the parameters Let's take a ...
Method overriding is the way of using polymorphism between classes. if one class is inherited from another, the former (sub class) can override the latter's (super class's) methods, and change the implementation. this is used where the super class defines the more general implementation of the meth...

Page 1 of 1