Which OOP concept is described as bundling data (state) with the methods that operate on that data, and controlling access to that state?
Practice this question from Quiz: OOPS Revision Sheet, with options and an explanation.
Question
Which OOP concept is described as bundling data (state) with the methods that operate on that data, and controlling access to that state?
Option A
Inheritance
Option B
Polymorphism
Option C — Correct answer
Encapsulation
Encapsulation is the mechanism of bundling data and methods together and restricting access to the data.
Option D
Abstraction