摘要:
try { Thread.sleep(100);} catch (InterruptedException e) { e.printStackTrace(); System.out.println("catched");} 以上代码中Thread.sleep(100)发生InterruptedException异常的情况很难模拟,可以通过Debug时手动抛出。方法如下:在Thread.sleep()处打断点,Debug,在程序步进到这行时,在Variables窗口中选中某对象,在输入框中输入throw new InterruptedException();选中后执行Exec 阅读全文
posted @ 2013-03-18 21:44
yldjoy
阅读(1860)
评论(0)
推荐(0)

浙公网安备 33010602011771号