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