黑马程序员技术交流社区
标题:
银行调度系统程序错误
[打印本页]
作者:
Dijkstra
时间:
2014-3-20 01:58
标题:
银行调度系统程序错误
本帖最后由 Dijkstra 于 2014-3-20 02:06 编辑
要命了,找不到怎么错的;
如果别的地方故意写个错误,这个错误就没了,真实见鬼了,但一直有错提示错误 Multiple markers at this line; Unreachable code
解决方法:remove;就这些,解决不了啊,怎么办
package cn.isoftstone.interview.bank;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
public class MainClass {
/**
* @param args
*/
/**
* @param args
*/
public static void main(String[] args) {
for(int i=1;1<5;i++){
ServiceWindow commonWindow = new ServiceWindow();
commonWindow.setWindowId(i);
commonWindow.start();
}
ServiceWindow expressWindow = new ServiceWindow();
expressWindow.setType(CustomerType.EXPRESS);
expressWindow.start();
ServiceWindow vipWindow = new ServiceWindow();
vipWindow.setType(CustomerType.VIP);
vipWindow.start();
Executors.newScheduledThreadPool(1).scheduleAtFixedRate(new Runnable(){
public void run(){
Integer number = NumberMachine.getInstance().getCommonManager().generateNewManager();
System.out.println(number + "号普通客户等待服务!");
}},
0,
Constants.COMMON_CUSTOMER_INTERVAL_TIME,
TimeUnit.SECONDS
);
Executors.newScheduledThreadPool(1).scheduleAtFixedRate(new Runnable(){
public void run(){
Integer number = NumberMachine.getInstance().getExpressManager().generateNewManager();
System.out.println(number + "号快速客户等待服务!");
}},
0,
Constants.COMMON_CUSTOMER_INTERVAL_TIME * 2,
TimeUnit.SECONDS
);
Executors.newScheduledThreadPool(1).scheduleAtFixedRate(new Runnable(){
public void run(){
Integer number = NumberMachine.getInstance().getVipManager().generateNewManager();
System.out.println(number + "号VIP客户等待服务!");
}},
0,
Constants.COMMON_CUSTOMER_INTERVAL_TIME * 6,
TimeUnit.SECONDS
);
}
}
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2