Java abstract classes and interfaces

When the base class is abstract, some functions cannot be implemented. For example, for animal classes, you can know how cats bark and dogs bark, but you can't tell how animals bark. Therefore, for more abstract base classes, some methods can only be declared and not implemented. Such methods are called abstract methods, and classes containing abstract methods are called abstract classes. Abstract methods and abstract classes need to be identified by the keyword abstract.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>