본문 바로가기

오버플로

검색하기
오버플로
프로필사진 NACO

  • 분류 전체보기 (46)
    • Java (31)
    • Oracle (14)
    • JDBC (0)
    • HTML CSS (0)
    • 일상 (1)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Tags
  • Annotaion
  • java
  • array
  • where
  • 예외처리
  • Reader
  • DB연동
  • 오라클
  • 자바
  • Oracle
  • 조회
  • Transaction
  • 8bit
  • 다이얼로그
  • driver
  • Join
  • 16bit
  • stream
  • Serializable
  • set
  • statement
  • swing
  • DB
  • 상속
  • 난수
  • select
  • transient
  • InputStream
  • Connection
  • JDBC
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록예외 처리 (1)

오버플로

[Java] Exception Handling - throws / throw / 사용자 정의 예외처리 Class

1. throws (예외 날림) - method 뒤에 정의하여 method 안쪽에서 발생된 예외를 호출한 곳에서 처리하도록 할 때 사용 - method를 호출한 곳에서 예외를 처리함 (예외가 발생된 곳과 예외를 처리하는 코드를 분리할 수 있음) - 예외를 날리면 method 안에서는 해당 예외를 try~catch로 처리할 필요가 없음 - method를 호출한 곳에서는 throws된 Exception을 try~catch or 또 다른 method로 throws - 문법) method header의 가장 마지막에 정의 public void test() throws 예외처리클래스명,,,(여러 개 가능) { } * throws 예외처리클래스명 - CompileException/RumtimeException 다 ..

Java 2021. 8. 26. 23:14
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바