************************************************************************
*******************************主函数调用类**********************************
package test.com;
public class Test {
public static void main(String[] args) {
Queue q=new Queue();
Producter p=new Producter(q);
Consumer c=new Consumer(q);
p.start();
c.start();
}}
*****************************************************************
OK,实现完毕
wait方法——把线程放入wait set
notify方法——从wait set拿出线程
notifyAll方法——从wait set拿出所有线程
wait、notify、notifyAll是Object类的方法