Type Here to Get Search Results !

Which of the following is NOT one of the four fundamental principles of Object-Oriented Programming?

0

 Which of the following is NOT one of the four fundamental principles of Object-Oriented Programming?

A) Encapsulation
B) Inheritance
C) Polymorphism
D) Compilation

Answer: D) Compilation

Explanation: The four fundamental principles of OOP are:

Encapsulation: This is the bundling of data and methods that operate on that data within a single unit (class). It restricts direct access to some of an object's components.
Inheritance: This allows a new class to inherit properties and behaviors (methods) from an existing class. It promotes code reusability.

Polymorphism: 
This enables objects to be treated as instances of their parent class, with the ability to take on multiple forms (e.g., method overloading and overriding).
Compilation is a process of converting code written in a high-level programming language into machine code, which is not specific to OOP.

Post a Comment

0 Comments