What is an abstract method? Abstract methods are modified by the keywords abstract, and there is no method body for abstract methods, that is, no curly brackets. For example, abstract function demo ();
What is an abstract class? An abstract class is a class modified with abstract keywords. An abstract class must have at least one abstract method. An abstract class cannot create an object,Therefore, the abstract class cannot access non-static attributes.. Others can be accessed. Abstract classes and interfaces are used to develop specifications so that third-party programs can be added.Subclass inherits abstract classes to implement all abstract methods of abstract classesOtherwise, this subclass is also an abstract class. After the subclass implements the abstract method of the abstract class (override the abstract method of the abstract class, add curly brackets), The subclass can create an object, and the subclass object can access the attributes and methods in the abstract class.