10th Chapter Interface

Source: Internet
Author: User

1. In an interface, all methods are abstract, and none of the methods provide a concrete implementation.

2. Classes cannot inherit interfaces, only methods defined by the interface can be implemented.

3. The interface does not contain any constructors.

4. An interface can inherit multiple interfaces.

5. The interface is not a class.

6. The interface is abstract by default, and you do not need to use the keyword abstract when declaring an interface.

7. Each method in the interface is also abstract by default, so it does not require the keyword abstract.

8. Methods in the interface the default access level is public.

9. A static method cannot be defined in an interface and can contain only abstract methods.

10. Interfaces without methods are called labeled interfaces.

10th Chapter Interface

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.