Polymorphism is the process of “an object can exhibit different type of behavior at different instances.”
This polymorphism has 2 types.
This polymorphism has 2 types.
1. Function overloading :
The process of defining multiple methods “with
same name and different signatures(parameter type/list)” Or
A class can have more than one function “with
same name and different signatures(parameter type/list)”
2. Function overriding:
The process “redefining super class methods into sub classes”
called function overriding
Or
A class can have more than one function “with
same name and same signatures(parameter type/list)”.
No comments:
Post a Comment