digital-garden/notes/Собеседования/Задачи/Задача 23.md
2024-06-13 21:01:37 +03:00

488 B

parents
Вопросы для собеседование Java
public class Application {
    private Service service;
    
    public Application(Service service) {
        this.service = service;
    }
    
    public void start() {
        service.serve();
    }
}

public class App {
    public static void main(String[] args) {
        Service service = new ServiceImpl();
        Application app = new Application(service);
        app.start();
    }
}