Java 5 supports enumerated types. These replace the old typesafe enum pattern, and are much more compact and easy to maintain. They can be used to list such collections of values as the days of the week or the suits of a deck of cards, or any fixed set of constants, such as the elements in a menu.