Can you provide an example of how to implement the Facade pattern in Java?

Implementing the Facade pattern in Java means creating a single class that internally coordinates calls to several subsystem classes and exposes only a small set of high-level methods for the client to call.

Key Points

Example

A HomeTheaterFacade wraps DvdPlayer, Amplifier, and Projector objects behind a single watchMovie() method, so a client just calls homeTheater.watchMovie() instead of separately turning on the projector, dimming lights, and starting the DVD player.

class HomeTheaterFacade {
    private final DvdPlayer dvd;
    private final Amplifier amp;
    private final Projector projector;

    HomeTheaterFacade(DvdPlayer dvd, Amplifier amp, Projector projector) {
        this.dvd = dvd;
        this.amp = amp;
        this.projector = projector;
    }

    void watchMovie() {
        projector.on();
        amp.on();
        dvd.play();
    }
}

Interview Tip

A concise interview answer is

I implement Facade by wrapping the subsystem classes inside a new class that exposes a few high-level methods, like watchMovie() in a home theater example, which internally call the individual subsystem methods in the right order so the client doesn't need to know those details.

Last updated: 16 July 2026

Previous question: How does the Facade pattern differ from the Adapter pattern?

Next question: What are the advantages of using the Facade pattern in large applications?

More Java Design Patterns interview questions

All Java Design Patterns questions