【多生产者多消费者实现】1.Runnable用于实现线程任务 2.BlockingQueue用于线程数据交换
1)产品packagejuc.blockingqueue;publicclassProduct{publicProduct(){}@OverridepublicStringtoString(){return"Product$"+this.hashCode();}}2)生产者packagejuc.blockingqueue;importjava.util.concurrent.BlockingQue