# Exception

say it: **“ek-SEP-shun”** **/ɪkˈsɛpʃən/**

An object describing a problem that interrupts normal program flow.

## What is **Exception** in Java?

**Exception** — An object describing a problem that interrupts normal program flow.

```java
class Reservation {
    void reserve(int seats) {
        if (seats < 1) {
            throw new IllegalArgumentException("seats");
        }
    }
}
```

Level: Journeyman · [More Java terms at this level](https://www.ask-codey.com/glossary?category=java&level=3)

Updated: November 17, 2026

## In other subjects

- [Exception in C#](https://www.ask-codey.com/glossary/exception-c-sharp)
- [Exception in Python](https://www.ask-codey.com/glossary/exception)

Source: https://www.ask-codey.com/glossary/exception-java
