1.

If a class is extending/inheriting another abstract class having abstract method, then _______________________(a) Either implementation of method or making class abstract is mandatory(b) Implementation of the method in derived class is mandatory(c) Making the derived class also abstract is mandatory(d) It’s not mandatory to implement the abstract method of parent classI had been asked this question in semester exam.The query is from Abstract Class in chapter Classes of Object Oriented Programming

Answer» CORRECT answer is (a) Either implementation of method or making CLASS abstract is mandatory

Explanation: Either of the two things MUST be DONE, either implementation or declaration of class as abstract. This is done to ensure that the method intended to be defined by other classes gets defined at EVERY possible class.


Discussion

No Comment Found

Related InterviewSolutions