package thead.start.thread_6;

import lombok.SneakyThrows;

public class ThreadB extends Thread {
    private final ObjectService objectService;

    public ThreadB(ObjectService objectService) {
        super();
        this.objectService = objectService;
    }

    @SneakyThrows
    @Override
    public void run() {
        super.run();
        objectService.serviceMethod();
    }
}