Home  >  Article  >  Java  >  What does java facade pattern refer to?

What does java facade pattern refer to?

王林
王林forward
2023-05-16 19:55:04989browse

1. It is required that the external and internal communication of the subsystem must be carried out through unified objects. The facade mode provides high-level interfaces to make the subsystem easier to use.

2. Generally speaking, it is to design a class specifically for external services. The facade object is the only channel in the external access subsystem.

Example

public class FacadeClient {
 
    public static void main(String[] args) {
        Car car = new Car();
        car.run();
        car.stop();
    }
}

The above is the detailed content of What does java facade pattern refer to?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete