📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    Question

    If a class contains an abstract method, what must be

    true about the class itself?
    A It must be declared final. Correct Answer Incorrect Answer
    B It must be declared public. Correct Answer Incorrect Answer
    C It must be declared abstract. Correct Answer Incorrect Answer
    D It must implement an interface. Correct Answer Incorrect Answer
    E It cannot have any fields. Correct Answer Incorrect Answer

    Solution

    If a class has even one abstract method, it means it's not fully implemented, and therefore it cannot be instantiated. To reflect this, the class itself must be declared abstract.

    Practice Next
    ask-question