1.

If an abstract class has all the private members, then _________(a) No class will be able to implement members of abstract class(b) Only single inheritance class can implement its members(c) Only other enclosing classes will be able to implement those members(d) No class will be able to access those members but can implement.I have been asked this question during an interview.The query is from Access Specifiers in division Access Specifiers of Object Oriented Programming

Answer» CORRECT answer is (a) No class will be able to implement members of abstract class

Explanation: The classes which inherit the abstract class, won’t be able to implement the members of abstract class. The PRIVATE members will not be INHERITED. This will restrict the SUBCLASSES to implement those members.


Discussion

No Comment Found

Related InterviewSolutions