I have read about Java enums and use them regularly. However, I don't understand why e.g `JFrame.EXIT_ON_CLOSE` returns an `int`.

Considering <http://download.oracle.com/javase/1.5.0/docs/guide/language/enums.html>;

```
// int Enum Pattern - has severe problems!
public static final int SEASON_WINTER = 0;
public static final int SEASON_SPRING = 1;
public static final int SEASON_SUMMER = 2;
public static final int SEASON_FALL   = 3;

```

*Not typesafe - Since a season is just an int you can pass in any other int value where a season is required, or add two seasons together (which makes no sense).*

`JFrame.EXIT_ON_CLOSE` returns **3**, while `JFrame.HIDE_ON_CLOSE` returns **1**, which means three of the latter equals the first.

**Why is it implemented this way?**