1.

Which among the following is correct for abstract class destructors?(a) It doesn’t have destructors(b) It has destructors(c) It may or may not have destructors(d) It contains an implicit destructorI have been asked this question in an interview for internship.My enquiry is from Destructors in division Constructors and Destructors of Object Oriented Programming

Answer»

Right ANSWER is (a) It doesn’t have destructors

The explanation is: It doesn’t have destructors. Since an ABSTRACT class don’t have CONSTRUCTORS, and hence can’t have instances. Having this case, the abstract CLASSES don’t have destructors too, because that would be of no use here.



Discussion

No Comment Found

Related InterviewSolutions