Answer the question
In order to leave comments, you need to log in
Java. Why doesn't IllegalArgumentException require throws?
Why doesn't IllegalArgumentException require throws?
void some() {
throw new IllegalArgumentException(); // тут всё нормально, throws не нужен
}
void some2() {
throw new Exception(); // тут ошибка, необходимо try/catch либо throws
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question