Programming Languages MCQ Questions and Answers

Encapsulation in Object Oriented Programming (OOPs) MCQ Questions and Answers

1. Which of the following best describes encapsulation in object-oriented programming? A) Exposing all fields of a class for easy access B) Combining data and methods that operate on that data into a single unit and restricting access to some of the object’s components C) Inheriting behaviour from multiple parent classes D) Writing only static