java线程系列---condition例子
摘要:
例如:有三个线程 ,当1执行完后,指定2执行,2执行完后指定3执行,3执行完后指定1执行public class ThreeConditionCommunication {public static void main(String[] args) {final Business business = new Business();new Thread(new Runnable() {@Overridepublic void run() {for(int i=1;i<=50;i++){business.sub2(i);}}}).start();new Thread(new Runnabl 阅读全文
posted @ 2012-06-30 05:36 java课程设计 阅读(310) 评论(0) 推荐(0) 编辑