Question 1
Back to Exercise
Which statement best defines encapsulation?
- A Inheriting from a parent class
- B Bundling data with the methods that use it and restricting direct access to the data Correct
- C Having many methods with the same name
- D Converting objects to bytes
Correct Answer: Option B
It is one of the four pillars of OOP.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!