There are three main concepts that any language needs to support to be an…
2021
There are three main concepts that any language needs to support to be an object-oriented language. Which of the following is one of them? I. Encapsulation II. Inheritance III. Polymorphism
- A.
I and II
- B.
II and III
- C.
I and III
- D.
I, II and III
Attempted by 258 students.
Show answer & explanation
Correct answer: D
The three main concepts required for a language to support Object-Oriented Programming (OOP) are:
Encapsulation – Binding data and methods together into a single unit (class) and restricting direct access to data.
Inheritance – Allowing one class to acquire properties and methods of another class for code reusability.
Polymorphism – Allowing the same function or method to behave differently in different situations.
Since all three are core principles of OOP, the correct answer is I, II and III.