179k views
1 vote
The IllegalArgumentException class extends the RuntimeException class, and is therefore:

a.) a checked exception class b.) an unchecked exception class c.) never used directly d.) None of these

User Kenwyn
by
5.2k points

1 Answer

2 votes

Answer:

b.) an unchecked exception class

Step-by-step explanation:

The IllegalArgumentException is a subclass of the RuntimeException class. As such it represents an unchecked exception. An unchecked exception is one which need not necessarily be thrown or caught within the method body. In contract, a checked exception (e.g., IOExeption ) needs to be declared in either the throws clause or needs to be handled in a try-catch block as part of the method.

User Carbonr
by
4.4k points