# Exception

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/subjects/java/journeyman)

Updated: September 27, 2026

## In other subjects

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

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