πŸ“’ Too many exams? Don’t know which one suits you best? Book Your Free Expert πŸ‘‰ call Now!

  • google app store apple app store
  • βœ–

      Question

      What is the primary purpose of Encapsulation in

      Object-Oriented Programming?
      A To allow a class to inherit properties from another class. Correct Answer Incorrect Answer
      B To hide the implementation details and show only essential features. Correct Answer Incorrect Answer
      C To bundle data and methods that operate on the data within a single unit. Correct Answer Incorrect Answer
      D To allow objects of different classes to be treated as objects of a common superclass. Correct Answer Incorrect Answer
      E To create multiple methods with the same name but different parameters. Correct Answer Incorrect Answer

      Solution

      Answer: c) To bundle data and methods that operate on the data within a single unit.

      Practice Next
      ask-question