Question:

Which of the following is not a principle of Object-Oriented Programming?

Show Hint

A common acronym to remember the four pillars of OOP is A PIE: Abstraction, Polymorphism, Inheritance, Encapsulation.
Updated On: Jul 2, 2026
  • Encapsulation
  • Interfaces
  • Abstraction
  • Polymorphism
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Object-Oriented Programming (OOP) is a programming paradigm based on the concept of objects. The fundamental principles of OOP are generally considered to be:
1. Encapsulation: The bundling of data (attributes) and the methods (functions) that operate on that data into a single unit called a class. It also involves restricting direct access to some of an object's components (data hiding). 2. Abstraction: Hiding complex implementation details and showing only the essential features of the object. It focuses on what an object does instead of how it does it. 3. Inheritance: A mechanism where a new class (subclass or derived class) derives properties and behaviors from an existing class (superclass or base class). 4. Polymorphism: The ability to present the same interface for differing underlying forms (data types). It allows objects of different classes to be treated as objects of a common superclass, most notably through method overriding.
Let's analyze the options:
(A) Encapsulation, (C) Abstraction, and (D) Polymorphism are all core principles of OOP.
(B) Interfaces: An interface is a programming construct (found in languages like Java and C#) that defines a contract of methods that a class must implement. While interfaces are a powerful tool used extensively in OOP to achieve abstraction and a form of polymorphism, they are generally considered a mechanism or a feature of a language rather than one of the foundational, universal principles of OOP itself. The core principles are the big four: Abstraction, Encapsulation, Inheritance, and Polymorphism. Thus, in the context of listing the fundamental principles, Interfaces is the outlier.
Was this answer helpful?
0
0