C:\jdk\bin>javac Revolve.java
Revolve.java:46: Exception java.lang.InterruptedException must be caught, or i
must be declared in the throws clause of this method.
try {Thread.sleep(10000); }
^
Revolve.java:47: Class InterrupterException not found in type declaration.
catch(InterrupterException e) {}异常写错了
应该是InterruptedException
Revolve.java:46: Exception java.lang.InterruptedException must be caught, or i
must be declared in the throws clause of this method.
try {Thread.sleep(10000); }
^
Revolve.java:47: Class InterrupterException not found in type declaration.
catch(InterrupterException e) {}异常写错了
应该是InterruptedException
解决方案 »
- 换不了行
- JTable如何删除当前列
- 求 判断输入日期是否大于本月最后一天的方法
- 请问怎么改变java sound的音量?
- 如何得到当前文件的绝对路径
- 『高分』关于classpath
- JavaScript 求助啊!! var 变量计算,调试结果总是出错啊
- 今天是平安夜 不信教 但多一个高兴的节日也不错 可是发现csdn对java的极度不尊重 感到很气愤!!!
- 高手幫忙!Socket連接數的問題(急急急!)
- java初学,有那位大哥能够告诉我用JAVA怎样做一个完整程序,譬如C/S OR B/S结构的,从头到尾的步骤,谢谢!
- 请众位高手帮我看看这段程序错在哪儿?怎样修改?
- 哪里有《Java程序调试实用手册 》电子书下载??给 100分
写成:InterrupterException
了。请看你的代码:
public void run () {
while(true) {
repaint();
current++;
if(current>2)
current=0;
try {Thread.sleep(10000); }
catch(InterrupterException e) {}//这里,嘿嘿
}
要扑捉异常
try{
runner.stop();}catch(Exception e){
}
catch(Exception e) {}/