1.

Which one of the following class can not be instantiated?(a) inherited class(b) abstract class(c) constant class(d) every classThe question was posed to me in an interview for internship.My question comes from Object Advanced Features topic in portion Objects and Databases in PHP of PHP

Answer»

Correct choice is (B) abstract class

To elaborate: An abstract class cannot be INSTANTIATED. INSTEAD, it defines (and, optionally, PARTIALLY implements) the interface for any class that might extend it.



Discussion

No Comment Found

Related InterviewSolutions