LearnFrenzy
Sign in Take a free test

Encapsulation · Encapsulation MCQ · Question 1

What is encapsulation? Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
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!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links