Name the four different features of OOPS.
Advertisements
Question
Name the four different features of OOPS.
Long Answer
Advertisements
Solution
- Encapsulation: It is the process of wrapping data and methods together into a single unit called a class. It helps in data security and protection.
- Inheritance: It is the process by which one class acquires the properties and methods of another class. It promotes code reusability.
- Polymorphism: It is the ability of an object or method to take different forms. It allows the same method name to perform different tasks.
- Abstraction: It is the process of hiding unnecessary implementation details and showing only the essential features to the user. It reduces complexity and makes programs easier to understand.
shaalaa.com
Is there an error in this question or solution?
