What is abstract class?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What is abstract class??

14th Mar 2017, 10:05 AM
Dishanka Shetty
Dishanka Shetty - avatar
3 Answers
+ 3
When an abstract class is subclassed, the subclass usually provides implementations for all of the abstract methods in its parent class.
14th Mar 2017, 10:55 AM
R KARTHIKEYAN
R KARTHIKEYAN - avatar
+ 1
abstract class is class which contain one or more abstract method/function. Abstract method is a incomplete method. public function doSomething(); This method is a abstract method. when we create a class contain this kind of method/function is called abstract class. eg. abstract class ABC{ abstract public function doSomething() } class XYZ extends ABC { // Our child class may define optional arguments not in the parent's signature public function doSomething($name) { return $name; } } $obj = new XYZ; echo $abj-> doSomething("Dev");
14th Mar 2017, 10:17 AM
Devish
Devish - avatar
0
a class which have declare with abstract key word then it is called as abstract class we can not create object of abstract class abstract class may or maynot contain abstract method abstract class will be override by its sib class which is derived from the abstract class syntax: accessspecifier abstract class<class name> { propeeties method constructor }
4th Jul 2017, 5:08 PM
dixu
dixu - avatar