Home »

What are the difference between abstract class and interface?

Question ListCategory: PHPWhat are the difference between abstract class and interface?
jeanderson295 author asked 8 years ago
1 Answers
milleranthony7 author answered 8 years ago

Abstract class: abstract classes are the class where one or moremethods are abstract but not necessarily all method has to be abstract.Abstract methods are the methods, which are declare in its class but not defined. The definition of those methods must be in its extending class.
Interface: Interfaces are one type of class where all the methods are abstract. That means all the methods only declared but not defined. All the methods must be defined by its implemented class.

Please login or Register to Submit Answer