Advertisements
Advertisements
प्रश्न
Define the following with an example each.
Polymorphism
परिभाषा
उत्तर
Polymorphism is the process of using a function for more than one purpose. It allows the use of different internal structures of the object by keeping the same external interface.
Example: Assume you have a smartphone to communicate. Communication mode: You can choose anything. It can be a call, text, photo, email, etc. So the purpose is the same, i.e. communication, but the approach is different. This is called polymorphism.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1.01: Introduction to Object Oriented Programming Concepts - EXERCISES [पृष्ठ ९]