1. Home
  2. Computer Science MCQs
  3. PHP
  4. Which one of the following is known as the key to…

Added 22 Jan 2024

Which one of the following is known as the key to object-oriented programming?

  1. Polymorphism
  2. Encapsulation Correct answer
  3. Data Abstraction
  4. Orthogonality

Correct answer

B. Encapsulation

13 views

MCQSEXAM

Explanation

Encapsulation is described as the key to object-oriented programming in the source text for this question: an object hides its internal data and exposes only a controlled interface.

Because client code cannot reach inside the object, the implementation can change freely. Polymorphism and abstraction build on this foundation rather than replace it.

Practise more Computer Science MCQs with answers and explanations on MCQsExam.com.

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More PHP MCQs

Practise all PHP MCQs

Similar MCQs