Question

    What is encapsulation in object-oriented programming?

    A It is a way to hide the internal details of an object and provide access only through public methods. Correct Answer Incorrect Answer
    B It is a way to define multiple classes within a single file. Correct Answer Incorrect Answer
    C It is a way to represent the relationships between different objects. Correct Answer Incorrect Answer
    D It is a way to create instances of a class. Correct Answer Incorrect Answer

    Solution

    Encapsulation is OOPS concept used to bind the data together.

    Practice Next

    Relevant for Exams:

    ×
    ×