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


    Question

    An abstract class in

    Java/C++:
    A Can be instantiated directly. Correct Answer Incorrect Answer
    B Must contain at least one abstract method. Correct Answer Incorrect Answer
    C Can have both abstract and concrete (implemented) methods. Correct Answer Incorrect Answer
    D Cannot have constructors. Correct Answer Incorrect Answer
    E Can only contain static methods. Correct Answer Incorrect Answer

    Solution

    An abstract class cannot be instantiated directly but can have constructors (which are called by subclasses). It can contain zero or more abstract methods, and also concrete methods with full implementations.

    Practice Next
    ask-question