本帖最后由 kacasi 于 2010-07-11 14:29:36 编辑

解决方案 »

  1.   


    public synchronized void push(Product2 product) {        while (this.index >= this.product.length) {
                try {
                    this.wait();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                //在这里没有再往下执行
                this.notify();
                this.product[index++] = product;
            }
        }
    你的this.product[index++] = product; 在while里面了