Python Programming - Polymorphism - Discussion

Discussion Forum : Polymorphism - General Questions (Q.No. 9)
9.
How is polymorphism different from encapsulation?
Polymorphism is the ability to hide implementation details, while encapsulation is the ability of an object to take on multiple forms.
Polymorphism is the ability to define custom behavior for operators, while encapsulation is the bundling of data and methods that operate on the data.
Polymorphism is the ability of a function to take different types of arguments, while encapsulation is the ability to represent data and the methods that operate on the data within a single unit.
Polymorphism is the ability of an object to take on multiple forms or types, while encapsulation is the ability to restrict access to certain details of an object and only expose what is necessary.
Answer: Option
Explanation:
Polymorphism is about the ability of objects to take on multiple forms or types, while encapsulation is about bundling data and methods within a single unit and controlling access to details.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.