Question:

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

Show Hint

Encapsulation, inheritance, and polymorphism are core principles of object-oriented programming, while compilation is a separate concept related to code execution.
Updated On: Jun 27, 2025
  • Encapsulation
  • Inheritance
  • Polymorphism
  • Compilation
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

Object-Oriented Programming (OOP) is based on several key principles:
- Encapsulation (A) is the concept of bundling data and methods that operate on that data within a single unit (class), hiding the implementation details from outside access.
- Inheritance (B) allows one class to inherit properties and behaviors from another, promoting code reuse.
- Polymorphism (C) allows objects of different types to be treated as objects of a common super type, typically allowing for method overriding.
- Compilation (D) is not a principle of OOP, but rather a process that converts high-level code into machine-readable code. It is not directly related to OOP principles.
Thus, the correct answer is (D), Compilation.
Was this answer helpful?
0
0