生产者消费者--Producer.java

package org.shw.pc;

public class Producer implements Runnable {
private Info info=null;

public Producer(Info info){
this.info = info;
}

public void run() {
for(int x=0;x<100;x++){
if(x%2==0){
this.info.set("MLDN","www.mldnjava.cn");
}else{
this.info.set("李兴华", "java讲师");
}
}
}

}
posted @ 2012-03-19 21:56  haiwei.sun  阅读(148)  评论(0编辑  收藏  举报
返回顶部