观众演员实例
//生产者消费者问题,信号灯法,标志位解决
public class TextPc02 {
public static void main(String[] args) {
Tv tv = new Tv();
new Actor(tv).start();
new Watcher(tv).start();
}
}
//演员
class Actor extends Thread{
Tv tv;
public Actor(Tv tv){
this.tv = tv