LearnFrenzy
Sign in Take a free test

Encapsulation · Encapsulation MCQ · Question 6

Data hiding versus encapsulation Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 6 Back to Exercise

How is data hiding related to encapsulation?

  • A They are unrelated
  • B Data hiding (making fields private) is one part of encapsulation, which also bundles behaviour with the data Correct
  • C Encapsulation is part of data hiding
  • D Data hiding means deleting data
Correct Answer: Option B

Encapsulation is the broader idea.

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