[求助]一个线程wait()以后,如果同一对象没有其他线程还能唤醒吗?
诸如这个线程
public synchronized void productBeer(){ while(true){ if(wb.bottlenumber==0) try { this.wait(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } wb.bottlenumber--; beernumber++; System.out.println("生产了"+beernumber+"瓶啤酒!"); } } public static void main(String[] args) { Winebottle wb = new Winebottle(); ProduceBeer pb = new ProduceBeer(wb); new Thread(wb).start(); new Thread(pb).start(); }