An abstract class can have a constructor, abstract methods, specific methods, static methods, various member variables, there are abstract methods of the class must be declared as an abstract class, abstract class does not have to abstract methods, a class can only inherit an abstract class.
Not have an interface configuration, only public abstract modification method, there are not specific methods, static methods, constant final modification only, a class can implement multiple interfaces
interface is primarily used for communication between the modules, and abstract class is mainly used for code reuse.
Abstract class (abstract class) and interfaces (interface) What is the difference?
Guess you like
Origin www.cnblogs.com/remta/p/12122255.html
Recommended
Ranking