develog

try catch finally - Flow 본문

Dev/Java

try catch finally - Flow

냐옴 2012. 4. 26. 17:35

Java

-------------------------------------

public static void exceptionTest() {

    System.out.println("1");

    

    try {

        System.out.println("2");

        throwException(); // 예외발생!

        System.out.println("3");

    } catch (Exception e) {

        System.out.println("4");

    } finally {

        System.out.println("5");

    }

    

    System.out.println("6");

}


결과

-------------------------------------

1

2

4

5

6


'Dev > Java' 카테고리의 다른 글

XSSF iterate  (0) 2012.04.28
JDBC Driver 버전 확인  (0) 2012.04.26
MyBatis 프로시저 호출, result parameterMap  (0) 2012.04.24
MyBatis 프로시저 호출, result Vo  (0) 2012.04.24
mybatis  (0) 2012.04.18
Comments