Exceptions · interview question
Which of these is an unchecked exception?
Multiple choiceEasy
Answer and explanation
Correct answer
A. IllegalArgumentException
Why
Unchecked exceptions extend RuntimeException (or Error). They usually signal programming errors such as bad arguments or null dereferences.
References
Test yourself on Exceptions
A free test with instant, explained results. No account needed.
More Exceptions questions
- Which statements about finally are true? Select all that apply.
- Explain checked vs unchecked exceptions in Java. When would you use each in your own API?
- Why does chaining exceptions in Java help in practice?
- Why can overusing exception wrapping become a problem in practice?
- Why wrap an exception with the original cause instead of replacing it completely?
- Which of the following is NOT a recommended practice for exception handling?