【发布时间】:2020-03-04 09:16:19
【问题描述】:
我正在尝试让我的线程睡眠并让方法抛出 InterruptedException,但它仍然给出错误“未处理的异常”
@Before
public void setUp() throws InterruptedException{
simulatorList.forEach(simulation -> {
....
Thread.sleep(1000*60*1);
//giving error here
...
});
}
【问题讨论】:
-
你的问题不清楚。这里的期望是什么?
标签: java