Home> Java> JavaBase> body text

Can abstract classes in java be inherited?

Release: 2020-01-14 13:45:37
Original
5819 people have browsed it

Can abstract classes in java be inherited?

Abstract classes can be inherited. (Recommended:java video tutorial)

1. An abstract class is just a special class, but it also has the characteristics of a class.

2. If there is an abstract method in this class, then this class must be defined as an abstract class.

3. If this abstract class inherits other abstract classes, then the abstract method does not need to be overridden.

Abstract classes contain more than one abstract method. These methods only provide function names and do not define how to implement them. They are implemented by inherited derived classes. Derived classes must implement all abstract class methods at the same time, otherwise they will It will become another abstract class in itself.

For more java knowledge, please pay attention to thejava basic tutorialcolumn on the PHP Chinese website.

The above is the detailed content of Can abstract classes in java be inherited?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!