프로그래밍 언어/자바
[자바] 예외클래스
크크크크
2021. 9. 17. 10:04
반응형
개요
예외 클래스들의 용도와 주로 어떤 클래스에서 사용되는지 파악하기 위함
1. 구조
2.예외 클래스
1. 구조(그림대체 예정)
RuntimeException --- IllegalArgumentException
FileNotFountException
if the file does not exist, is a directory rarher than a regular file, or for some other reason cannot be opened for reading.
1. 파일 존재여부
2. 파일이 아니고 디렉터리인 경우
3. 어떤 이유로 파일을 읽을 수 없을 경우
SecurityException
if a security manager exists and its checkRead method denied read access to the file.
1. 보안 매니저 여부
2. 리소스 액세스하는데 필요한 권한이 없는 경우
IllegalArgumentExeption (RuntimeExeption)
Thrown to indicate that a method has been passed an illegal or inappropriate argument
1. 부적절한 인수가 들어왔을 경우
반응형