public class Test {
public static void main(String[] args) {
StoreHouse storeHouse = new StoreHouse();
Producer producer = new Producer("生产者", storeHouse);
Consumer comsumer = new Consumer("消费者", storeHouse);
Thread t1 = new Thread(producer);
Thread t2 = new Thread(comsumer);
t1.start();
t2.start();
}
}

被折叠的 条评论
为什么被折叠?



