First of all, the abstract class cannot be instantiated. its function is mainly to define the interface for the inherited subclass, and the methods in the abstract class are not specifically implemented. What are the benefits of abstract classes? It helps design the hierarchy of classes and enables partial classes and methods to declare inherited relational abstract classes.
First of all, the abstract class cannot be instantiated. its function is mainly to define the interface for the inherited subclass and the methods in the abstract class.
There is no specific implementation. What are the benefits of abstract classes? It helps design the hierarchy of classes and enables partial classification and methods
Inheritance relationships
Abstract keywords are used to declare an abstract class: abstract class myClass {}
See the following code:
IntroduceWeb ("php", "www.phpddt.com"); echo"
"; $ Web2 = new myWeb2 (); $ web1-> introduceWeb (" Baidu "," www.baidu.com ");?>