Question: Explain the concept of polymorphism in object-oriented programming.Answer: Polymorphism allows objects of different types to be treated as objects of a common type. It includes method overloading and method overriding.Example:
|
Is it helpful?
Yes
No
Most helpful rated by users:
- What is the difference between a stack and a queue?
- What is the purpose of an index in a database?
- What is the purpose of the \'git\' version control system?