1.

Is it necessary that all the abstract methods must be defined from an abstract class?(a) Yes, depending on code(b) Yes, always(c) No, never(d) No, if function is not used, no definition is requiredI got this question in a job interview.This is a very interesting question from Abstract Class topic in section Classes of Object Oriented Programming

Answer»

The correct ANSWER is (b) Yes, always

Explanation: That is the rule of PROGRAMMING LANGUAGE that each function declared, must have some definition. There can’t be some abstract METHOD that remains undefined. Even if it’s there, it would RESULT in compile time error.



Discussion

No Comment Found

Related InterviewSolutions