Question

    What is the purpose of an interface in object-oriented programming?

    A It is a way to define a blueprint for a class. Correct Answer Incorrect Answer
    B It is a way to create instances of a class. 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 hide the internal details of an object. Correct Answer Incorrect Answer

    Solution

    interface is totally abstract in nature and it is used to define blueprints.

    Practice Next

    Relevant for Exams: