如果发现异常,执行异常后的代码是?也就是catch {...}
之后的块。java中执行catch代码块后的代码
{
.....
try {
.....
}
catch (some exception se) {
.....
}
.....
}
如果发现异常,执行异常后的代码是?也就是catch {...}
之后的块。java中执行catch代码块后的代码
{
.....
try {
.....
}
catch (some exception se) {
.....
}
.....
}
如果catch块返回,break(while循环中)会抛出一个运行时异常或发出System.exit - no。否则,代码应该通过。我确定有一些因素我在这里忘了。
...
try {
// Code block 1
}
catch (some execption se) {
// Code block 2: run if there is exception in Code block 1
}
// This block will run if there is no exception/return/break/Sytem.exit() in Code block 2
你应该阅读:http://docs.oracle.com/javase/tutorial/essential/exceptions/handling.html
你为什么不尝试一下自己呢?然后你可以回报并告诉我们所发生的一切。 –