Polymorphism :
It is greek Word poly Means Many Morphism Means Forms Thats call Many Forms.
"Same Class Name But Diffrent parameter call polymorphism"
Example :
There Are Two Types Of Polymorphism
- Compile Time Polymorphism
- Run Time Polymorphism
- Compile Time Polymorphism : Define Multiple Method With Same Class Name but Diffrent Passing Parameter.
- Run Time Polymorphism : If base class and derived class have member functions with same name and arguments. If you create an object of derived class and write code to access that member function then, the member function in derived class is only invoked.
0 comments:
Post a Comment