- public class Test{
- public static String output="";
- public static void foo(int i){
- try {
- if(i==1){
-
- throw new Exception();
-
- }
- output +="1";
- }
- catch(Exception e){
- output+="2";
- return;
- } finally{
- output+="3";
- }
- output+="4";
- }
- public static void main(String args[]){
- foo(0);
- foo(1);
- }
- }
复制代码 看看这个小程序的运行过程啊。不太理解。抛了异常会继续运行吗。最好给出运行过程。万分感谢 |
|