
catch 블럭)throws 키워드 사용throw와 예외를 메서드에 선언할 때 쓰이는 throws 구별void method() throws Exception1, Exception2 {} // 메서드 예외 선언
void method() throws Exception {} // 모든 예외가 발생 가능 알림
오버라이딩 조건 - 조상보다 많은 예외 선언 불가
try 블럭 안에 return 문이 있어서 try 블럭을 벗어날 때도 finally 블럭 실행try {
startInstall();
deleteTempFiles(); // 중복 코드
} catch (Exception e) {
deleteTempFiles(); // 중복 코드
try {
startInstall();
} catch (Exception e) {
e.printStackTrace();
} finally {
deleteTempFiles(); // 중복 제거
}