- public static void main(String[] args) {
-
- ss();
- }
-
- public static int ss(){
- int result = 0;
- try {
- System.out.println("try中");
- result++;
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- System.out.println("catch中");
- return result;
- }
- finally{
- System.out.println("finally中");
- System.out.println(result);
- }
- return result;
- }
复制代码
会被执行到,详细看代码 |