1.

It is _________________________ to have an abstract method.(a) Not mandatory for an static class(b) Not mandatory for a derived class(c) Not mandatory for an abstract class(d) Not mandatory for parent classThis question was addressed to me in an interview for internship.Asked question is from Abstract Class in portion Classes of Object Oriented Programming

Answer»

Right CHOICE is (c) Not mandatory for an abstract class

Explanation: Derived, PARENT and static CLASSES can’t have abstract METHOD (We can’t say what type of these classes is). And for abstract class it’s not mandatory to have abstract method. But if any abstract method is there inside a class, then class must be abstract type.



Discussion

No Comment Found

Related InterviewSolutions