Java White Papers
Java 1.5 Tiger: Enumerated Types
Overview In Java 1.4 and below, there were two basic ways to define new types: through classes and interfaces. For most object-oriented programming, this would seem to be enough. The problem is that there are still some very specific cases where neither is these is sufficient, most commonly when one needs to define a finite set of allowed values for a specific data type. For instance, one might want a type called Grade that can only be assigned values of A, B, C, D, F, or Incomplete. Any other values are illegal for this type. This sort of construct is possible prior to Tiger, but it takes a lot of work, and there are still some significant problems.
| Publisher | O'Reilly Media | File Format | |
|---|---|---|---|
| Date Published | June 2004 | ||
| Format | Book chapters | ||
| Topics | |||



