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!