求教线程的问题 本帖最后由 kacasi 于 2010-07-11 14:29:36 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 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里面了 关于socket编程 关于可配置的数据库插入操作 关于JRE和JDK进一步的问题 线程出错后是否立即停止? 怎么把linux自带的jdk卸载掉 一段简单代码,请高手看看. 急!请教一个问题:如何在TableView中加上Button?(100分) ui界面,JTable的表头锁定问题和表头单元格合并问题 经典问题!大家踊跃回答了啊 从Access数据库中检索符合条件的日期的SQL语句该怎么写? Java取色器 SWITCH的一个标号判断的问题
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里面了