Interface, java Interface

Source: Internet
Author: User

Interface, java Interface

Interfaces in JAVA
1. Six interface-related design modes:

01. Custom Service Mode: Design fine-grained interfaces. Each interface represents a group of related services and creates a composite interface through inheritance.

02. Adapter mode: when the two interfaces do not match, use the adapter to convert the interfaces.

03. Default adapter mode: Provides simple default implementation for interfaces.

04. Proxy mode: Create a proxy class for the interface implementation class. The user obtains the service of the implementation class through the proxy class.

05. Identify type mode: use an interface to identify an abstract type without any behavior.

06. Constant interface mode: defines static constants in the excuse, and introduces these constants in other classes through the import static statement.

2. concepts and basic features of interfaces

01. The interface has two meanings:

0.1 1 refers to a conceptual interface, that is, all services provided by the system to external parties. All methods of the class that can be accessed by external users constitute the class interface.

0.2 second, interfac

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.