package thead.start.thread_6;

public class Run {
    public static void main(String[] args) {
        // 因为使用的时同一个 ObjectService 所以代码是同步执行的
        ObjectService objectService = new ObjectService();
        ThreadA threadA = new ThreadA(objectService);
        threadA.setName("ThreadA");
        threadA.start();

        ThreadB threadB = new ThreadB(objectService);
        threadB.setName("ThreadB");
        threadB.start();
    }
}
