Skip to content

Glossary: Java Basics

IllegalArgumentException

The standard exception for "this argument isn't allowed". A method throws it when it is given a value it can't accept, such as a bad quantity, a negative price or an unknown drink.

Where the book teaches it

Related terms

ThrowNumberFormatExceptionException