php - How can an abstract class be executed if it cannot be instantiated -
i trying out oop programming in php , when instantiated class, generated error saying that class needs abstract.
when class need abstract? , how can abstract classes called? thanks
i can't think of situation error class needs abstract. more got error when trying instantiate abstract class. along lines of "cannot create instance of abstract class".
abstract classes cannot not instantiated directly. instead extended child class (a concrete class) can instantiated. abstract class template provides common functionality other sub-classes. includes abstract methods child classes must implement.
Comments
Post a Comment